summaryrefslogtreecommitdiffstats
path: root/projectroot/etc/init.d/dnsmasq
blob: 6e6aa5dbc86e37a085ddd08de434c2bf1e6f3fef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh
#
# /etc/init.d/dnsmasq
#
# $Id$
#
PIDFILE=/var/run/dnsmasq.pid

case $1 in

	start)
		test -e $PIDFILE && echo "already running"
		echo "dnsmasq starting"
		/usr/sbin/dnsmasq
		;;

	stop)
		test -e $PIDFILE || echo "not running"
		kill -s SIGTERM `cat $PIDFILE`
		;;

	reload)
		test -e $PIDFILE || echo "not running"
		kill -s SIGHUP `cat $PIDFILE`
		;;

	*)
		echo "Usage: ${0} {start|stop|reload}"
		exit 1
		;;

esac