summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-dns/nsd/files')
-rw-r--r--net-dns/nsd/files/digest-nsd-2.3.51
-rw-r--r--net-dns/nsd/files/nsd.cron10
-rw-r--r--net-dns/nsd/files/nsd.initd61
3 files changed, 72 insertions, 0 deletions
diff --git a/net-dns/nsd/files/digest-nsd-2.3.5 b/net-dns/nsd/files/digest-nsd-2.3.5
new file mode 100644
index 000000000..3954bec0f
--- /dev/null
+++ b/net-dns/nsd/files/digest-nsd-2.3.5
@@ -0,0 +1 @@
+MD5 e9dfb18d544cd37c57b05a91384037e9 nsd-2.3.5.tar.gz 239147
diff --git a/net-dns/nsd/files/nsd.cron b/net-dns/nsd/files/nsd.cron
new file mode 100644
index 000000000..990fc7803
--- /dev/null
+++ b/net-dns/nsd/files/nsd.cron
@@ -0,0 +1,10 @@
+#!/bin/sh
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+#
+NSDC_BIN="/usr/sbin/nsdc"
+
+if [[ -x ${NSDC_BIN} ]]; then
+ ${NSDC_BIN} update >>/dev/null 2>&1
+fi
diff --git a/net-dns/nsd/files/nsd.initd b/net-dns/nsd/files/nsd.initd
new file mode 100644
index 000000000..ad911c69c
--- /dev/null
+++ b/net-dns/nsd/files/nsd.initd
@@ -0,0 +1,61 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+#
+opts="${opts} rebuild reload status update notify"
+depend() {
+ need net
+ use logger
+}
+
+checkconfig() {
+ if [ ! -e "/etc/nsd/nsdc.conf" -a ! -e "/etc/nsd/nsd.zones" ]; then
+ eerror "You need to create apropriate configs"
+ eerror "in /etc/nsd/ . Examples can be found in /etc/nsd/*.sample"
+ return 1
+ fi
+}
+
+start() {
+ ebegin "Starting nsd"
+ checkconfig && \
+ /usr/sbin/nsdc start &>/dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping nsd"
+ /usr/sbin/nsdc stop &>/dev/null
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading nsd"
+ /usr/sbin/nsdc reload &>/dev/null
+ eend $?
+}
+
+rebuild() {
+ ebegin "Rebuild nsd database"
+ /usr/sbin/nsdc rebuild &>/dev/null
+ eend $?
+}
+
+status() {
+ ebegin "Check if nsd is running"
+ /usr/sbin/nsdc running &>/dev/null
+ eend $?
+}
+
+update() {
+ ebegin "Updating nsd zones"
+ /usr/sbin/nsdc update &>/dev/null
+ eend $?
+}
+
+notify() {
+ ebegin "Notify slave servers for zones"
+ /usr/sbin/nsdc notify &>/dev/null
+ eend $?
+}