summaryrefslogtreecommitdiff
path: root/net/djbdns-run/files
diff options
context:
space:
mode:
Diffstat (limited to 'net/djbdns-run/files')
-rw-r--r--net/djbdns-run/files/README.pkgsrc11
-rw-r--r--net/djbdns-run/files/axfrdns.sh51
-rw-r--r--net/djbdns-run/files/dnscache-showctl.sh20
-rw-r--r--net/djbdns-run/files/dnscache.sh44
-rw-r--r--net/djbdns-run/files/tinydns-showctl.sh17
-rw-r--r--net/djbdns-run/files/tinydns.sh50
6 files changed, 193 insertions, 0 deletions
diff --git a/net/djbdns-run/files/README.pkgsrc b/net/djbdns-run/files/README.pkgsrc
new file mode 100644
index 00000000000..74280189c92
--- /dev/null
+++ b/net/djbdns-run/files/README.pkgsrc
@@ -0,0 +1,11 @@
+ Getting help
+ ============
+
+You've installed an automated and customized djbdns-run package.
+If you're having trouble getting the djbdns daemons to run, ask
+the package's maintainer:
+
+<URL:mailto:schmonz-nbdjbdns@schmonz.com>
+
+If you need to ask for help on the dns list, please mention that
+you're using the djbdns-run package from pkgsrc.
diff --git a/net/djbdns-run/files/axfrdns.sh b/net/djbdns-run/files/axfrdns.sh
new file mode 100644
index 00000000000..6ef582c1fc1
--- /dev/null
+++ b/net/djbdns-run/files/axfrdns.sh
@@ -0,0 +1,51 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: axfrdns.sh,v 1.1.1.1 2004/09/01 20:13:04 schmonz Exp $
+#
+# @PKGNAME@ script to control axfrdns (DNS zone-transfer and TCP service)
+#
+
+# PROVIDE: axfrdns named
+# REQUIRE: SERVERS tinydns
+# BEFORE: DAEMON
+
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
+
+name="axfrdns"
+rcvar=${name}
+required_files="@PKG_SYSCONFDIR@/axfrdns/tcp.cdb"
+command="@LOCALBASE@/bin/tcpserver"
+procname=${name}
+start_precmd="axfrdns_precmd"
+extra_commands="cdb"
+cdb_cmd="axfrdns_cdb"
+
+# User-settable rc.conf variables and their default values:
+axfrdns_tcpflags=${axfrdns_tcpflags-"-vDRHl0"}
+axfrdns_datalimit=${axfrdns_datalimit-"300000"}
+axfrdns_logcmd=${axfrdns_logcmd-"@LOCALBASE@/bin/setuidgid Gdnslog logger -t nb${name} -p daemon.info"}
+
+axfrdns_precmd()
+{
+ command="@SETENV@ - ROOT=@PKG_SYSCONFDIR@/tinydns IP=${tinydns_ip} @LOCALBASE@/bin/envuidgid Gaxfrdns @LOCALBASE@/bin/softlimit -d ${axfrdns_datalimit} @LOCALBASE@/bin/argv0 @LOCALBASE@/bin/tcpserver ${name} ${axfrdns_tcpflags} -x @PKG_SYSCONFDIR@/axfrdns/tcp.cdb -- ${tinydns_ip} 53 @LOCALBASE@/bin/axfrdns </dev/null 2>&1 | ${axfrdns_logcmd}"
+ command_args="&"
+ rc_flags=""
+}
+
+axfrdns_cdb()
+{
+ @ECHO@ "Reloading @PKG_SYSCONFDIR@/axfrdns/tcp."
+ cd @PKG_SYSCONFDIR@/axfrdns
+ @LOCALBASE@/bin/tcprules tcp.cdb tcp.tmp < tcp
+}
+
+if [ -f /etc/rc.subr ]; then
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ @ECHO_N@ " ${name}"
+ axfrdns_precmd
+ eval ${command} ${axfrdns_flags} ${command_args}
+fi
diff --git a/net/djbdns-run/files/dnscache-showctl.sh b/net/djbdns-run/files/dnscache-showctl.sh
new file mode 100644
index 00000000000..693668f7949
--- /dev/null
+++ b/net/djbdns-run/files/dnscache-showctl.sh
@@ -0,0 +1,20 @@
+#!@SH@
+# (c) Copyright 2001-2002 Jonathan de Boyne Pollard. All rights reserved. "Moral" rights asserted.
+# Permission is hereby granted to distribute this script unmodified.
+for i do (
+ cd "$i"
+ echo "$i" | sed -e 's/./*/g'
+ echo "$i"
+ echo "$i" | sed -e 's/./*/g'
+ echo
+ echo '+++ Configuration options:'
+ egrep '[A-Za-z0-9_]+=' run
+ ( cd env 2>/dev/null && grep "^" /dev/null * )
+ echo
+ echo '+++ Authorised client IP address prefixes:'
+ ls -1 root/ip
+ echo
+ echo '+++ Hardwired content server IP addresses:'
+ cd root/servers && grep "^" /dev/null *
+ echo
+); done
diff --git a/net/djbdns-run/files/dnscache.sh b/net/djbdns-run/files/dnscache.sh
new file mode 100644
index 00000000000..82244e0eb9f
--- /dev/null
+++ b/net/djbdns-run/files/dnscache.sh
@@ -0,0 +1,44 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: dnscache.sh,v 1.1.1.1 2004/09/01 20:13:04 schmonz Exp $
+#
+# @PKGNAME@ script to control dnscache (caching DNS resolver)
+#
+
+# PROVIDE: dnscache named
+# REQUIRE: SERVERS
+# BEFORE: DAEMON
+
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
+
+name="dnscache"
+rcvar=${name}
+required_dirs="@PKG_SYSCONFDIR@/dnscache/ip @PKG_SYSCONFDIR@/dnscache/servers"
+required_files="@PKG_SYSCONFDIR@/dnscache/servers/@"
+command="@LOCALBASE@/bin/${name}"
+start_precmd="dnscache_precmd"
+
+# User-settable rc.conf variables and their default values:
+dnscache_ip=${dnscache_ip-"127.0.0.1"}
+dnscache_ipsend=${dnscache_ipsend-"0.0.0.0"}
+dnscache_size=${dnscache_size-"1000000"}
+dnscache_datalimit=${dnscache_datalimit-"3000000"}
+dnscache_logcmd=${dnscache_logcmd-"@LOCALBASE@/bin/setuidgid Gdnslog logger -t nb${name} -p daemon.info"}
+
+dnscache_precmd()
+{
+ command="@SETENV@ - ROOT=@PKG_SYSCONFDIR@/dnscache IP=${dnscache_ip} IPSEND=${dnscache_ipsend} CACHESIZE=${dnscache_size} @LOCALBASE@/bin/envuidgid Gdnscache @LOCALBASE@/bin/softlimit -o250 -d ${dnscache_datalimit} @LOCALBASE@/bin/dnscache </dev/random 2>&1 | ${dnscache_logcmd}"
+ command_args="&"
+ rc_flags=""
+}
+
+if [ -f /etc/rc.subr ]; then
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ @ECHO_N@ " ${name}"
+ dnscache_precmd
+ eval ${command} ${dnscache_flags} ${command_args}
+fi
diff --git a/net/djbdns-run/files/tinydns-showctl.sh b/net/djbdns-run/files/tinydns-showctl.sh
new file mode 100644
index 00000000000..860c25febaf
--- /dev/null
+++ b/net/djbdns-run/files/tinydns-showctl.sh
@@ -0,0 +1,17 @@
+#!@SH@
+# (c) Copyright 2001-2002 Jonathan de Boyne Pollard. All rights reserved. "Moral" rights asserted.
+# Permission is hereby granted to distribute this script unmodified.
+for i do (
+ cd "$i"
+ echo "$i" | sed -e 's/./*/g'
+ echo "$i"
+ echo "$i" | sed -e 's/./*/g'
+ echo
+ echo '+++ Configuration options:'
+ egrep '[A-Za-z0-9_]+=' run
+ ( cd env 2>/dev/null && grep "^" /dev/null * )
+ echo
+ echo '+++ Apices of those parts of the namespace that will be served up:'
+ sed -ne '/^[Z.]/{s/^.//;s/:.*$//;s/\([^.]\)$/\1./;p;}' < root/data
+ echo
+); done
diff --git a/net/djbdns-run/files/tinydns.sh b/net/djbdns-run/files/tinydns.sh
new file mode 100644
index 00000000000..a0202d4032a
--- /dev/null
+++ b/net/djbdns-run/files/tinydns.sh
@@ -0,0 +1,50 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: tinydns.sh,v 1.1.1.1 2004/09/01 20:13:04 schmonz Exp $
+#
+# @PKGNAME@ script to control tinydns (authoritative DNS service)
+#
+
+# PROVIDE: tinydns named
+# REQUIRE: SERVERS
+# BEFORE: DAEMON
+
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
+
+name="tinydns"
+rcvar=${name}
+required_files="@PKG_SYSCONFDIR@/tinydns/data.cdb"
+command="@LOCALBASE@/bin/${name}"
+start_precmd="tinydns_precmd"
+extra_commands="cdb"
+cdb_cmd="tinydns_cdb"
+
+# User-settable rc.conf variables and their default values:
+tinydns_ip=${tinydns_ip-"127.0.0.2"}
+tinydns_datalimit=${tinydns_datalimit-"300000"}
+tinydns_logcmd=${tinydns_logcmd-"@LOCALBASE@/bin/setuidgid Gdnslog logger -t nb${name} -p daemon.info"}
+
+tinydns_precmd()
+{
+ command="@SETENV@ - ROOT=@PKG_SYSCONFDIR@/tinydns IP=${tinydns_ip} @LOCALBASE@/bin/envuidgid Gtinydns @LOCALBASE@/bin/softlimit -d ${tinydns_datalimit} @LOCALBASE@/bin/tinydns </dev/null 2>&1 | ${tinydns_logcmd}"
+ command_args="&"
+ rc_flags=""
+}
+
+tinydns_cdb()
+{
+ @ECHO@ "Reloading @PKG_SYSCONFDIR@/tinydns/data."
+ cd @PKG_SYSCONFDIR@/tinydns
+ @LOCALBASE@/bin/tinydns-data
+}
+
+if [ -f /etc/rc.subr ]; then
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ @ECHO_N@ " ${name}"
+ tinydns_precmd
+ eval ${command} ${tinydns_flags} ${command_args}
+fi