587751e5bf00eca75ef80beb90ab32f3cfb7b6c8
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / dnsmasq / S80dnsmasq
1 #!/bin/sh
2
3 [ -x /usr/sbin/dnsmasq ] || exit 0
4 [ -f /etc/dnsmasq.conf ] || exit 0
5
6 case "$1" in
7         start)
8                 echo -n "Starting dnsmasq: "
9                 start-stop-daemon -S -x /usr/sbin/dnsmasq
10                 [ $? = 0 ] && echo "OK" || echo "FAIL"
11                 ;;
12         stop)
13                 echo -n "Stopping dnsmasq: "
14                 start-stop-daemon -K -q -x /usr/sbin/dnsmasq
15                 [ $? = 0 ] && echo "OK" || echo "FAIL"
16                 ;;
17         restart|reload)
18                 $0 stop
19                 $0 start
20                 ;;
21         *)
22                 echo "Usage: $0 {start|stop|restart}"
23                 exit 1
24 esac
25
26 exit 0