diff options
author | pav <pav@FreeBSD.org> | 2004-02-29 04:03:50 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2004-02-29 04:03:50 +0800 |
commit | 5e2f40af6b3be98a785856d9c644c3775b90b05f (patch) | |
tree | 22569b86c1792aec4f5bf71d237bc207706e4980 /dns/powerdns-devel/files | |
parent | e6fec4edc2babf7689cb8b1a7246c564bbfabbfc (diff) | |
download | freebsd-ports-gnome-5e2f40af6b3be98a785856d9c644c3775b90b05f.tar.gz freebsd-ports-gnome-5e2f40af6b3be98a785856d9c644c3775b90b05f.tar.zst freebsd-ports-gnome-5e2f40af6b3be98a785856d9c644c3775b90b05f.zip |
- Add sample startup script
PR: ports/62344
Submitted by: maintainer
Diffstat (limited to 'dns/powerdns-devel/files')
-rw-r--r-- | dns/powerdns-devel/files/pdns.sh.sample | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/dns/powerdns-devel/files/pdns.sh.sample b/dns/powerdns-devel/files/pdns.sh.sample new file mode 100644 index 000000000000..d19be1bfd061 --- /dev/null +++ b/dns/powerdns-devel/files/pdns.sh.sample @@ -0,0 +1,34 @@ +#!/bin/sh + +rc_file=${0##*/} + +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/${rc_file}\$"); then + echo "${rc_file}: Cannot determine PREFIX." >&2 + echo "Please use the complete pathname." >&2 + exit 64 +fi + +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 + $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 |