aboutsummaryrefslogtreecommitdiff
path: root/dns/ez-ipupdate
diff options
context:
space:
mode:
Diffstat (limited to 'dns/ez-ipupdate')
-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