summaryrefslogtreecommitdiff
path: root/package/bind/files/named.init
diff options
context:
space:
mode:
Diffstat (limited to 'package/bind/files/named.init')
-rw-r--r--package/bind/files/named.init27
1 files changed, 27 insertions, 0 deletions
diff --git a/package/bind/files/named.init b/package/bind/files/named.init
new file mode 100644
index 000000000..1838eefee
--- /dev/null
+++ b/package/bind/files/named.init
@@ -0,0 +1,27 @@
+#!/bin/sh
+#FWINIT 60
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+ autostart)
+ test x"${named:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+ start)
+ if [ -f /etc/bind/named.conf ]; then
+ named -c /etc/bind/named.conf
+ fi
+ ;;
+ stop)
+ killall named
+ ;;
+ restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+ *)
+ echo "usage: $0 {start | stop | restart}"
+ exit 1
+esac
+exit $?