aboutsummaryrefslogtreecommitdiffstats
path: root/extra/bind/bind.initd
blob: 6469ee79ac48464e1053fe8caa5642f5d06e03b1 (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
#!/sbin/runscript

NAME=named
DAEMON=/usr/sbin/$NAME

depend() {
	need net
	use logger
	provide dns
}

start() {
	ebegin "Starting ${NAME}"
	start-stop-daemon --start --quiet --background \
		--exec ${DAEMON} --nicelevel ${NICELEVEL} \
		-- -u ${USER} -n ${CPU} ${OPTS}
	eend $?
}

stop() {
	ebegin "Stopping ${NAME}"
	start-stop-daemon --stop --quiet --pidfile $PIDFILE
	eend $?
}