aboutsummaryrefslogtreecommitdiffstats
path: root/community/pdns/pdns.initd
diff options
context:
space:
mode:
authorAndrew Domaszek <brimston3@hg0.us>2017-04-04 18:24:16 -0400
committerJakub Jirutka <jakub@jirutka.cz>2017-04-19 23:42:13 +0200
commit3a679fc9e1d34deefe4f4d2d380b552f368b2a8b (patch)
tree98bb20773949add3c5bd089fba662a21017b2160 /community/pdns/pdns.initd
parentd7a3365bf39a2beabe0b5def3d5f359bd0b12951 (diff)
downloadaports-3a679fc9e1d34deefe4f4d2d380b552f368b2a8b.tar.gz
aports-3a679fc9e1d34deefe4f4d2d380b552f368b2a8b.tar.bz2
aports-3a679fc9e1d34deefe4f4d2d380b552f368b2a8b.tar.xz
community/pdns: fix init script, tracking of crashed process
Diffstat (limited to 'community/pdns/pdns.initd')
-rw-r--r--community/pdns/pdns.initd42
1 files changed, 6 insertions, 36 deletions
diff --git a/community/pdns/pdns.initd b/community/pdns/pdns.initd
index b6429bf858..88d8b28f26 100644
--- a/community/pdns/pdns.initd
+++ b/community/pdns/pdns.initd
@@ -1,15 +1,7 @@
#!/sbin/openrc-run
-# 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
-extra_started_commands="dump reload"
-extra_commands="monitor"
-
PDNS_INSTANCE="${SVCNAME#pdns[.-]}"
PDNS_CONFIG=""
@@ -20,26 +12,17 @@ else
PDNS_INSTANCE="default"
fi
+command="/usr/sbin/pdns_server"
+command_args="--guardian=no --daemon=no --write-pid=no $PDNS_CONFIG"
+command_background="yes"
+extra_started_commands="dump reload"
+pidfile="/run/$RC_SVCNAME.pid"
+
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
@@ -51,16 +34,3 @@ dump() {
${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 $?
-}