aboutsummaryrefslogtreecommitdiffstats
path: root/testing/pdns/pdns.initd
diff options
context:
space:
mode:
authorMatt Smith <mcs@darkregion.net>2011-04-05 07:03:25 -0500
committerMatt Smith <mcs@darkregion.net>2011-04-05 07:06:35 -0500
commit2bf9528b2e0f8350fbd20976efdce0bafb3e4b33 (patch)
treebb4e916718d167a53465c0d7d2ab1d6b23ab644a /testing/pdns/pdns.initd
parentdcd1f5b67f797d77535a5c9ab53bad11819da64a (diff)
downloadaports-2bf9528b2e0f8350fbd20976efdce0bafb3e4b33.tar.gz
aports-2bf9528b2e0f8350fbd20976efdce0bafb3e4b33.tar.bz2
aports-2bf9528b2e0f8350fbd20976efdce0bafb3e4b33.tar.xz
testing/pdns: new aport
PowerDNS Authoritative Server http://www.powerdns.com/
Diffstat (limited to 'testing/pdns/pdns.initd')
-rw-r--r--testing/pdns/pdns.initd64
1 files changed, 64 insertions, 0 deletions
diff --git a/testing/pdns/pdns.initd b/testing/pdns/pdns.initd
new file mode 100644
index 0000000000..593d56347b
--- /dev/null
+++ b/testing/pdns/pdns.initd
@@ -0,0 +1,64 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dns/pdns/files/pdns,v 1.10 2007/05/07 20:19:18 swegener Exp $
+
+name=pdns
+daemon=/usr/sbin/pdns_server
+pdns_control=/usr/bin/pdns_control
+opts="reload monitor dump"
+
+PDNS_INSTANCE="${SVCNAME#pdns[.-]}"
+PDNS_CONFIG=""
+
+if [ -n "${PDNS_INSTANCE}" ] && [ "${PDNS_INSTANCE}" != "pdns" ]
+then
+ PDNS_CONFIG="--config-name=${PDNS_INSTANCE}"
+else
+ PDNS_INSTANCE="default"
+fi
+
+depend() {
+ need net
+ after firewall
+}
+
+start() {
+ ebegin "Starting PowerDNS (${PDNS_INSTANCE})"
+ ${daemon} \
+ ${PDNS_CONFIG} \
+ --daemon=yes \
+ --guardian=yes
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping PowerDNS (${PDNS_INSTANCE})"
+ ${pdns_control} ${PDNS_CONFIG} quit &>/dev/null
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading PowerDNS (${PDNS_INSTANCE})"
+ ${pdns_control} ${PDNS_CONFIG} cycle &>/dev/null
+ eend $?
+}
+
+dump() {
+ ebegin "Dumping PowerDNS (${PDNS_INSTANCE}) variables"
+ ${pdns_control} ${PDNS_CONFIG} list
+ eend $?
+}
+
+monitor() {
+ ebegin "Starting PowerDNS (${PDNS_INSTANCE}) in monitor mode"
+ ${daemon} \
+ ${PDNS_CONFIG} \
+ --daemon=no \
+ --guardian=no \
+ --control-console=yes \
+ --loglevel=9 \
+ --log-dns-details=yes \
+ --query-logging=yes
+ eend $?
+}