summaryrefslogtreecommitdiffstats
path: root/contrib/dnsmasq_MacOSX/DNSmasq
blob: 6b6211897122484a82d8c11911fa212b1f2ddb79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
. /etc/rc.common

StartService() {
  if [ "${DNSMASQ:=-NO-}" = "-YES-" ] ; then
    /usr/local/sbin/dnsmasq -q -n
  fi
}

StopService() {
  pid=`GetPID dnsmasq`
  if [ $? -eq 0 ]; then
    kill $pid
  fi
}

RestartService() {
  StopService "$@"
  StartService "$@"
}

RunService "$1"