e8bb7e6833
- $PREFIX no longer hardcoded (fixed by Dirk Meyer). - Pet portlint a bit PR: ports/63530 Submitted by: maintainer
31 lines
583 B
Bash
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
|