blob: bead283292eb240225264b39ec89ae5c10d3d30f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#!/sbin/runscript
# Copyright 1999-2005 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.4 2005/07/17 04:50:51 swegener Exp $
opts="${opts} reload"
# Default instance
PDNS_INSTANCE="default"
PDNS_CONFIG=""
# Multiple instances support
if [[ "${myservice:0:5}" = "pdns-" && -n "${myservice:5}" ]]
then
PDNS_INSTANCE="${myservice:5}"
PDNS_CONFIG="--config-name=${PDNS_INSTANCE}"
fi
depend() {
need net
}
start() {
ebegin "Starting PowerDNS (${PDNS_INSTANCE})"
/usr/sbin/pdns_server ${PDNS_CONFIG} --daemon --guardian=yes
eend $?
}
stop() {
ebegin "Stopping PowerDNS (${PDNS_INSTANCE})"
start-stop-daemon --stop --quiet --pidfile /var/run/${myservice}.pid
eend $?
}
reload() {
ebegin "Reloading PowerDNS (${PDNS_INSTANCE})"
/usr/bin/pdns_control ${PDNS_CONFIG} cycle &>/dev/null
eend $?
}
|