1 #!/bin/sh 2 . /etc/rc.common 3 4 StartService() { 5 if [ "${DNSMASQ:=-NO-}" = "-YES-" ] ; then 6 /usr/local/sbin/dnsmasq -q -n 7 fi 8 } 9 10 StopService() { 11 pid=`GetPID dnsmasq` 12 if [ $? -eq 0 ]; then 13 kill $pid 14 fi 15 } 16 17 RestartService() { 18 StopService "$@" 19 StartService "$@" 20 } 21 22 RunService "$1" 23