summaryrefslogtreecommitdiff
path: root/package/maradns/files
diff options
context:
space:
mode:
Diffstat (limited to 'package/maradns/files')
-rw-r--r--package/maradns/files/deadwood.conffiles1
-rw-r--r--package/maradns/files/deadwood.init32
-rw-r--r--package/maradns/files/deadwood.postinst3
-rw-r--r--package/maradns/files/dwood3rc10
-rw-r--r--package/maradns/files/maradns.init4
-rw-r--r--package/maradns/files/mararc3
-rw-r--r--package/maradns/files/zoneserver.init32
-rw-r--r--package/maradns/files/zoneserver.postinst3
8 files changed, 83 insertions, 5 deletions
diff --git a/package/maradns/files/deadwood.conffiles b/package/maradns/files/deadwood.conffiles
new file mode 100644
index 000000000..ae8ce0df9
--- /dev/null
+++ b/package/maradns/files/deadwood.conffiles
@@ -0,0 +1 @@
+/etc/dwood3rc
diff --git a/package/maradns/files/deadwood.init b/package/maradns/files/deadwood.init
new file mode 100644
index 000000000..e40656635
--- /dev/null
+++ b/package/maradns/files/deadwood.init
@@ -0,0 +1,32 @@
+#!/bin/sh
+#PKG deadwood
+#INIT 50
+
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${deadwood:-NO}" = x"NO" && exit 0
+ test x"$deadwood" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start
+ exec sh $0 start
+ ;;
+start)
+ [ -f /etc/dwood3rc ] || exit
+ [ -d /etc/maradns/logger ] || mkdir -p /etc/maradns/logger
+ /usr/bin/duende --pid=/var/run/dwood.pid /usr/sbin/Deadwood
+ ;;
+stop)
+ kill $(</var/run/dwood.pid)
+ ;;
+restart)
+ sh $0 stop
+ sleep 1
+ sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ exit 1
+ ;;
+esac
+exit $?
diff --git a/package/maradns/files/deadwood.postinst b/package/maradns/files/deadwood.postinst
new file mode 100644
index 000000000..fe2ba721b
--- /dev/null
+++ b/package/maradns/files/deadwood.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf deadwood NO
diff --git a/package/maradns/files/dwood3rc b/package/maradns/files/dwood3rc
new file mode 100644
index 000000000..4fed26411
--- /dev/null
+++ b/package/maradns/files/dwood3rc
@@ -0,0 +1,10 @@
+chroot_dir="/etc/maradns"
+bind_address="0.0.0.0"
+maradns_uid=65534
+maxprocs=5
+random_seed_file="/dev/urandom"
+recursive_acl="192.168.1.0/24"
+root_servers={}
+root_servers["."]="198.41.0.4,128.9.0.107,192.33.4.12,128.8.10.90,192.203.230.10,192.5.5.241,192.112.36.4,128.63.2.53,192.36.148.17,192.58.128.30,193.0.14.129,198.32.64.12,202.12.27.33"
+#upstream_servers={}
+#upstream_servers["."]=""
diff --git a/package/maradns/files/maradns.init b/package/maradns/files/maradns.init
index 9b0e3b900..9ca23dc05 100644
--- a/package/maradns/files/maradns.init
+++ b/package/maradns/files/maradns.init
@@ -14,10 +14,10 @@ autostart)
start)
[ -f /etc/mararc ] || exit
[ -d /etc/maradns/logger ] || mkdir -p /etc/maradns/logger
- /usr/sbin/maradns &
+ /usr/bin/duende --pid=/var/run/maradns.pid /usr/sbin/maradns
;;
stop)
- kill $(pgrep -f /usr/sbin/maradns)
+ kill $(</var/run/maradns.pid)
;;
restart)
sh $0 stop
diff --git a/package/maradns/files/mararc b/package/maradns/files/mararc
index 29ab4fe8b..ae437af68 100644
--- a/package/maradns/files/mararc
+++ b/package/maradns/files/mararc
@@ -4,9 +4,6 @@ bind_address="0.0.0.0"
maradns_uid=65534
maxprocs=5
random_seed_file="/dev/urandom"
-recursive_acl="192.168.1.0/24"
-root_servers={}
-root_servers["."]="198.41.0.4,128.9.0.107,192.33.4.12,128.8.10.90,192.203.230.10,192.5.5.241,192.112.36.4,128.63.2.53,192.36.148.17,192.58.128.30,193.0.14.129,198.32.64.12,202.12.27.33"
# uncomment these to set up real zones
#csv1={}
diff --git a/package/maradns/files/zoneserver.init b/package/maradns/files/zoneserver.init
new file mode 100644
index 000000000..1c9f0d529
--- /dev/null
+++ b/package/maradns/files/zoneserver.init
@@ -0,0 +1,32 @@
+#!/bin/sh
+#PKG zoneserver
+#INIT 60
+
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${maradns:-NO}" = x"NO" && exit 0
+ test x"$maradns" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start
+ exec sh $0 start
+ ;;
+start)
+ [ -f /etc/mararc ] || exit
+ [ -d /etc/maradns/logger ] || mkdir -p /etc/maradns/logger
+ /usr/bin/duende --pid=/var/run/zoneserver.pid /usr/sbin/zoneserver
+ ;;
+stop)
+ kill $(</var/run/zoneserver.pid)
+ ;;
+restart)
+ sh $0 stop
+ sleep 1
+ sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ exit 1
+ ;;
+esac
+exit $?
diff --git a/package/maradns/files/zoneserver.postinst b/package/maradns/files/zoneserver.postinst
new file mode 100644
index 000000000..f3a6b9a49
--- /dev/null
+++ b/package/maradns/files/zoneserver.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf zoneserver NO