aboutsummaryrefslogtreecommitdiffstats
path: root/main/bind/bind.initd
diff options
context:
space:
mode:
Diffstat (limited to 'main/bind/bind.initd')
-rw-r--r--main/bind/bind.initd24
1 files changed, 24 insertions, 0 deletions
diff --git a/main/bind/bind.initd b/main/bind/bind.initd
new file mode 100644
index 0000000000..6469ee79ac
--- /dev/null
+++ b/main/bind/bind.initd
@@ -0,0 +1,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 $?
+}