#!/sbin/runscript
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-dns/pdns-recursor/files/precursor,v 1.5 2011/12/04 10:13:16 swegener Exp $

extra_started_commands="ping"

depend() {
	need net
}

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

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

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