diff options
author | Mark Felder <feld@FreeBSD.org> | 2018-04-05 20:37:15 +0000 |
---|---|---|
committer | Mark Felder <feld@FreeBSD.org> | 2018-04-05 20:37:15 +0000 |
commit | f6e0419b4579f8006d82ccafe8f5c8f3605bbdd9 (patch) | |
tree | fe724a78d92afba9498857ade9484fd7473cc0d2 | |
parent | c4df193039e92c772d7ec7f2fe2147c892d616ad (diff) | |
download | freebsd-ports-f6e0419b4579f8006d82ccafe8f5c8f3605bbdd9.zip |
dns/nsnotifyd: Add basic rc script
Approved by: maintainer
-rw-r--r-- | dns/nsnotifyd/Makefile | 3 | ||||
-rw-r--r-- | dns/nsnotifyd/files/nsnotifyd.in | 37 |
2 files changed, 40 insertions, 0 deletions
diff --git a/dns/nsnotifyd/Makefile b/dns/nsnotifyd/Makefile index 70c5be6ebf2c..03e9fafbdc4c 100644 --- a/dns/nsnotifyd/Makefile +++ b/dns/nsnotifyd/Makefile @@ -2,6 +2,7 @@ PORTNAME= nsnotifyd PORTVERSION= 1.6 +PORTREVISION= 1 CATEGORIES= dns MASTER_SITES= http://dotat.at/prog/nsnotifyd/ @@ -15,6 +16,8 @@ GNU_CONFIGURE= yes USES= shebangfix SHEBANG_FILES= nsnotify-liststealth +USE_RC_SUBR= nsnotifyd + EXEFILES= nsnotify nsnotifyd BINFILES= nsnotify-liststealth nsnotify2git nsnotify2stealth nsnotify2update MAN1FILES= metazone nsnotify nsnotifyd diff --git a/dns/nsnotifyd/files/nsnotifyd.in b/dns/nsnotifyd/files/nsnotifyd.in new file mode 100644 index 000000000000..4e4d46146cf2 --- /dev/null +++ b/dns/nsnotifyd/files/nsnotifyd.in @@ -0,0 +1,37 @@ +#!/bin/sh +# +# Author: Mark Felder <feld@FreeBSD.org> +# +# $FreeBSD$ +# + +# PROVIDE: nsnotifyd +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable nsnotifyd: +# nsnotifyd_enable="YES" +# nsnotifyd_flags="<set as needed>" + +. /etc/rc.subr + +name=nsnotifyd +rcvar=nsnotifyd_enable + +load_rc_config $name + +: ${nsnotifyd_enable:=NO} + +command="/usr/local/bin/nsnotifyd" +start_precmd=precmd + +precmd() +{ + if [ "${nsnotifyd_flags}x" = "x" ]; then + echo "Please set your required service options via nsnotifyd_flags in /etc/rc.conf." + echo "Check the contents of man nsnotifyd for more details." + exit 1 + fi +} + +run_rc_command "$1" |