summaryrefslogtreecommitdiffstats
path: root/main/ez-ipupdate/ez-ipupdate.initd
diff options
context:
space:
mode:
authorJeremy Thomerson <jeremy@thomersonfamily.com>2009-08-22 05:00:23 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-08-22 14:46:43 +0000
commit49afd339b03ce74e0a76ac59656083aa56ba8b55 (patch)
treebce417fdd9ecc8a4a4e0f53e0ca184746e391049 /main/ez-ipupdate/ez-ipupdate.initd
parentcfb5fcad7f74b5932afc832c787762631ad797a9 (diff)
downloadaports-49afd339b03ce74e0a76ac59656083aa56ba8b55.tar.bz2
aports-49afd339b03ce74e0a76ac59656083aa56ba8b55.tar.xz
main/ez-ipupdate: new aport
utility for updating your host name for many of the dynamic DNS services (ez-ip.net, dyndns.org, etc) http://ez-ipupdate.com/
Diffstat (limited to 'main/ez-ipupdate/ez-ipupdate.initd')
-rw-r--r--main/ez-ipupdate/ez-ipupdate.initd54
1 files changed, 54 insertions, 0 deletions
diff --git a/main/ez-ipupdate/ez-ipupdate.initd b/main/ez-ipupdate/ez-ipupdate.initd
new file mode 100644
index 00000000..45d28741
--- /dev/null
+++ b/main/ez-ipupdate/ez-ipupdate.initd
@@ -0,0 +1,54 @@
+#!/sbin/runscript
+
+# init.d file for ez-ipupdate
+
+NAME=ez-ipupdate
+DAEMON=/usr/bin/$NAME
+DAEMON_GROUP=ipupdate
+DAEMON_USER=ipupdate
+
+# load the config
+. /etc/conf.d/${NAME}
+
+# now convert it into command line options
+OPTS="-d -S ${SERVICE} -h ${HOST} -u \"${USER}:${PASS}\" -i ${IFACE}"
+if [ "$WILDCARD" == 1 ]; then
+ OPTS="${OPTS} -w"
+fi
+if [ "$SERVER" != "" ]; then
+ OPTS="${OPTS} -s \"${SERVER}\""
+fi
+OPTS="${OPTS} -t ${TIMEOUT} -M ${MAX_INTERVAL}"
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting ${NAME}"
+ start-stop-daemon --start --quiet \
+ --pidfile /var/run/${NAME}.pid \
+ --chuid ${DAEMON_USER}:${DAEMON_GROUP} \
+ --exec ${DAEMON} -- ${OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${NAME}"
+ start-stop-daemon --stop --quiet \
+ --exec ${DAEMON} \
+ --pidfile /var/run/${NAME}.pid \
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading ${NAME}"
+ if ! service_started "${NAME}" ; then
+ eend 1 "${NAME} is not started"
+ return 1
+ fi
+ start-stop-daemon --stop --oknodo --signal HUP \
+ --exec ${DAEMON} --pidfile /var/run/${NAME}.pid
+ eend $?
+}
+