]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/dnsmasq/S80dnsmasq
dnsmasq: don't test if the binary exists in the init script
[coffee/buildroot.git] / package / dnsmasq / S80dnsmasq
1 #!/bin/sh
2
3 [ -f /etc/dnsmasq.conf ] || exit 0
4
5 case "$1" in
6         start)
7                 printf "Starting dnsmasq: "
8                 start-stop-daemon -S -x /usr/sbin/dnsmasq
9                 [ $? = 0 ] && echo "OK" || echo "FAIL"
10                 ;;
11         stop)
12                 printf "Stopping dnsmasq: "
13                 start-stop-daemon -K -q -x /usr/sbin/dnsmasq
14                 [ $? = 0 ] && echo "OK" || echo "FAIL"
15                 ;;
16         restart|reload)
17                 $0 stop
18                 $0 start
19                 ;;
20         *)
21                 echo "Usage: $0 {start|stop|restart}"
22                 exit 1
23 esac
24
25 exit 0