From 0b0d1bf7da18aba03e2351a0182c2a364cc9072e Mon Sep 17 00:00:00 2001 From: Martin Hierling Date: Wed, 28 Jun 2006 13:22:46 +0000 Subject: New Ebuild for bug 128246 net-dns/nsd thanks to Albert Holm svn path=/sunrise/; revision=347 --- net-dns/nsd/files/digest-nsd-2.3.5 | 1 + net-dns/nsd/files/nsd.cron | 10 +++++++ net-dns/nsd/files/nsd.initd | 61 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 net-dns/nsd/files/digest-nsd-2.3.5 create mode 100644 net-dns/nsd/files/nsd.cron create mode 100644 net-dns/nsd/files/nsd.initd (limited to 'net-dns/nsd/files') 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 $? +} -- cgit v1.2.3-65-gdbad