summaryrefslogtreecommitdiff
path: root/dns
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2003-09-05 20:12:10 +0000
committerStefan Eßer <se@FreeBSD.org>2003-09-05 20:12:10 +0000
commitc4f11582de13edb71bd6159384ed25e360f02bc3 (patch)
tree0373b14e9486855721d4b73a3334629340d59f80 /dns
parent- update to 4.1b (diff)
Add rcNG start/stop script.
Based on the patch provided with the PR, but the PREFIX is determined at run time in the committed version. PR: ports/56176 Submitted by: Kimura Fuyuki <fuyuki@nigredo.org>
Notes
Notes: svn path=/head/; revision=88605
Diffstat (limited to 'dns')
-rw-r--r--dns/ez-ipupdate/Makefile2
-rw-r--r--dns/ez-ipupdate/files/ez-ipupdate.sh34
-rw-r--r--dns/ez-ipupdate/pkg-plist1
3 files changed, 37 insertions, 0 deletions
diff --git a/dns/ez-ipupdate/Makefile b/dns/ez-ipupdate/Makefile
index 2aa624f0f97e..38191bda8a4e 100644
--- a/dns/ez-ipupdate/Makefile
+++ b/dns/ez-ipupdate/Makefile
@@ -13,6 +13,7 @@ MASTER_SITES= http://gusnet.cx/proj/ez-ipupdate/dist/
MAINTAINER= se@FreeBSD.org
COMMENT= Update your host name on any dynamic DNS service
+USE_RC_SUBR= yes
GNU_CONFIGURE= yes
post-install:
@@ -23,5 +24,6 @@ post-install:
done
${INSTALL_DATA} ${WRKSRC}/example.conf \
${PREFIX}/etc/ez-ipupdate.conf.sample
+ ${INSTALL_SCRIPT} ${WRKDIR}/ez-ipupdate.sh ${PREFIX}/etc/rc.d
.include <bsd.port.mk>
diff --git a/dns/ez-ipupdate/files/ez-ipupdate.sh b/dns/ez-ipupdate/files/ez-ipupdate.sh
new file mode 100644
index 000000000000..510cf414a874
--- /dev/null
+++ b/dns/ez-ipupdate/files/ez-ipupdate.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: ez-ipupdate
+# REQUIRE:
+# BEFORE:
+# KEYWORD: FreeBSD shutdown
+
+# Add the following line to /etc/rc.conf to enable ez-ipupdate:
+#
+#ez_ipupdate_enable="YES"
+#
+
+. /etc/rc.subr
+
+if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/${0##*/}\$"); then
+ echo "$0: Cannot determine the PREFIX" >&2
+ exit 1
+fi
+
+name="ez_ipupdate"
+rcvar=`set_rcvar`
+command="$PREFIX/bin/ez-ipupdate"
+pidfile="/var/run/ez-ipupdate.pid"
+required_files="$PREFIX/etc/ez-ipupdate.conf"
+sig_stop="QUIT"
+
+ez_ipupdate_enable="NO"
+ez_ipupdate_flags="-c $PREFIX/etc/ez-ipupdate.conf -d -F $pidfile"
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/dns/ez-ipupdate/pkg-plist b/dns/ez-ipupdate/pkg-plist
index 218cc8411137..4ba2fab1fcdf 100644
--- a/dns/ez-ipupdate/pkg-plist
+++ b/dns/ez-ipupdate/pkg-plist
@@ -1,5 +1,6 @@
bin/ez-ipupdate
etc/ez-ipupdate.conf.sample
+etc/rc.d/ez-ipupdate.sh
share/examples/ez-ipupdate/example-dhs.conf
share/examples/ez-ipupdate/example-dyndns.conf
share/examples/ez-ipupdate/example-dyns.conf