freebsd-ports/dns/powerdns-devel/files/pdns.sh.sample
Pav Lucistnik e8bb7e6833 - Some small fixes to startup-script (fixed by Dirk Meyer and Ralf vd Enden).
- $PREFIX no longer hardcoded (fixed by Dirk Meyer).
- Pet portlint a bit

PR:		ports/63530
Submitted by:	maintainer
2004-03-02 19:27:59 +00:00

31 lines
583 B
Bash

#!/bin/sh
rc_file=${0##*/}
PREFIX=%%PREFIX%%
pdns=${PREFIX}/sbin/pdns_server
pdnscontrol=${PREFIX}/bin/pdns_control
pdnsrecursor=${PREFIX}/sbin/pdns_recursor
recursorpid=/var/run/pdns_recursor.pid
# start
if [ "x$1" = "x" -o "x$1" = "xstart" ]; then
if [ -f $pdns ]; then
echo -n ' PowerDNS'
if [ -f $pdnsrecursor ]; then
rm $recursorpid >/dev/null 2>&1
$pdnsrecursor >/dev/null 2>&1
fi
$pdns
fi
# stop
elif [ "x$1" = "xstop" ]; then
if [ -f $pdnscontrol ]; then
$pdnscontrol quit
fi
if [ -r $recursorpid ]; then
kill `cat $recursorpid` >/dev/null
fi
fi