summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-dns/pdnsd/files/pdnsd.rc6.1')
-rw-r--r--net-dns/pdnsd/files/pdnsd.rc6.144
1 files changed, 44 insertions, 0 deletions
diff --git a/net-dns/pdnsd/files/pdnsd.rc6.1 b/net-dns/pdnsd/files/pdnsd.rc6.1
new file mode 100644
index 000000000000..1c53664182e6
--- /dev/null
+++ b/net-dns/pdnsd/files/pdnsd.rc6.1
@@ -0,0 +1,44 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dns/pdnsd/files/pdnsd.rc6.1,v 1.1 2010/03/09 15:39:08 flameeyes Exp $
+
+opts="reload"
+
+depend() {
+ need net
+ provide dns
+}
+
+checkconfig() {
+ if [ ! -e /etc/pdnsd/pdnsd.conf ] ; then
+ eerror "You need an /etc/pdnsd/pdnsd.conf file first."
+ eerror "There is a sample in /etc/pdnsd/pdnsd.conf.sample"
+ return 1
+ fi
+
+ if [ ! -d /var/cache/pdnsd ] ; then
+ mkdir /var/cache/pdnsd
+ chown pdnsd:pdnsd /var/cache/pdnsd
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting pdnsd"
+ start-stop-daemon --start --exec /usr/sbin/pdnsd \
+ -- -s -t -d -p /var/run/pdnsd.pid ${PDNSDCONFIG}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping pdnsd"
+ start-stop-daemon --stop --pidfile /var/run/pdnsd.pid
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading pdnsd.conf"
+ /usr/sbin/pdnsd-ctl config
+ eend $?
+}