summaryrefslogtreecommitdiff
path: root/net-dns/pdns-recursor/files/pdns-recursor
blob: ebff2b02b85f16387d2e5ad874d609ad9a5665d6 (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
#!/sbin/openrc-run
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

extra_started_commands="ping"

depend() {
	need net
}

start() {
	ebegin "Starting PowerDNS Recursor"
	/usr/sbin/pdns_recursor --daemon=yes >/dev/null 2>&1
	eend $?
}

stop() {
	ebegin "Stopping PowerDNS Recursor"
	/usr/bin/rec_control quit >/dev/null 2>&1
	eend $?
}

ping() {
	ebegin "Pinging PowerDNS Recursor"
	/usr/bin/rec_control ping >/dev/null 2>&1
	eend $?
}