svn commit: r466599 - in head/dns/nsnotifyd: . files
Mark Felder
feld at FreeBSD.org
Thu Apr 5 20:37:16 UTC 2018
Author: feld
Date: Thu Apr 5 20:37:15 2018
New Revision: 466599
URL: https://svnweb.freebsd.org/changeset/ports/466599
Log:
dns/nsnotifyd: Add basic rc script
Approved by: maintainer
Added:
head/dns/nsnotifyd/files/
head/dns/nsnotifyd/files/nsnotifyd.in (contents, props changed)
Modified:
head/dns/nsnotifyd/Makefile
Modified: head/dns/nsnotifyd/Makefile
==============================================================================
--- head/dns/nsnotifyd/Makefile Thu Apr 5 20:13:48 2018 (r466598)
+++ head/dns/nsnotifyd/Makefile Thu Apr 5 20:37:15 2018 (r466599)
@@ -2,6 +2,7 @@
PORTNAME= nsnotifyd
PORTVERSION= 1.6
+PORTREVISION= 1
CATEGORIES= dns
MASTER_SITES= http://dotat.at/prog/nsnotifyd/
@@ -14,6 +15,8 @@ GNU_CONFIGURE= yes
USES= shebangfix
SHEBANG_FILES= nsnotify-liststealth
+
+USE_RC_SUBR= nsnotifyd
EXEFILES= nsnotify nsnotifyd
BINFILES= nsnotify-liststealth nsnotify2git nsnotify2stealth nsnotify2update
Added: head/dns/nsnotifyd/files/nsnotifyd.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/dns/nsnotifyd/files/nsnotifyd.in Thu Apr 5 20:37:15 2018 (r466599)
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# Author: Mark Felder <feld at 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"
More information about the svn-ports-all
mailing list