diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2010-11-24 15:44:15 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2010-11-24 15:44:15 +0000 |
commit | ada37ff89aba306794cc0dc7e2e9e0e7f51ed3cf (patch) | |
tree | 7651f22902570c780044238c9e8f5f464c9c004c /dns/nsd | |
parent | 2473c414a4b53b355d3d277cfc2097721adccab0 (diff) |
Notes
Diffstat (limited to 'dns/nsd')
-rw-r--r-- | dns/nsd/Makefile | 1 | ||||
-rw-r--r-- | dns/nsd/files/nsd.in | 27 |
2 files changed, 22 insertions, 6 deletions
diff --git a/dns/nsd/Makefile b/dns/nsd/Makefile index 1a4e33afa36f..bef7a8f00df0 100644 --- a/dns/nsd/Makefile +++ b/dns/nsd/Makefile @@ -7,6 +7,7 @@ PORTNAME= nsd PORTVERSION= 3.2.6 +PORTREVISION= 1 CATEGORIES= dns ipv6 MASTER_SITES= http://www.nlnetlabs.nl/downloads/nsd/ \ ftp://ftp.rhnet.is/pub/nsd/ diff --git a/dns/nsd/files/nsd.in b/dns/nsd/files/nsd.in index 632ea4910a60..77191dcea87f 100644 --- a/dns/nsd/files/nsd.in +++ b/dns/nsd/files/nsd.in @@ -17,24 +17,39 @@ rcvar=`set_rcvar` required_files=%%PREFIX%%/etc/nsd/nsd.conf -command=%%PREFIX%%/sbin/${name} +command=%%PREFIX%%/sbin/nsdc +command_args="start" pidfile=`%%PREFIX%%/sbin/nsd-checkconf -o pidfile %%PREFIX%%/etc/nsd/nsd.conf` load_rc_config ${name} nsd_enable=${nsd_enable-"NO"} +extra_commands="reload" +start_precmd="nsd_precmd" +reload_cmd="nsd_reload" stop_cmd="nsd_stop" +nsd_precmd() +{ + db=`%%PREFIX%%/sbin/nsd-checkconf -o database %%PREFIX%%/etc/nsd/nsd.conf` + if [ ! -f "$db" ]; then + ${command} rebuild + fi +} + +nsd_reload() +{ + ${command} rebuild && ${command} reload +} + nsd_stop() { echo "Merging nsd zone transfer changes to zone files." - %%PREFIX%%/sbin/nsdc patch - - sleep 5 + ${command} patch - echo "Stopping nsd." - %%PREFIX%%/sbin/nsdc stop + echo "Stopping ${name}." + ${command} stop } run_rc_command "$1" |