diff options
author | John Bowler <jbowler@nslu2-linux.org> | 2005-11-28 07:19:35 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2005-11-28 07:19:35 +0000 |
commit | 872ed8f1882bc54a002b836aa6b136cde76eb229 (patch) | |
tree | cb45d1d738521acb18aeb72f61ad08c56e20a7d1 /packages/ez-ipupdate/files/init | |
parent | af8ec74a677aa9e7e5411ecc341a82480622ee74 (diff) |
ez-ipupdate: release 3.0.10
- fully tested release with startup script and prototype config
- file. This package will update a wide range of dynamic IP services.
- Tested on zoneedit.
Diffstat (limited to 'packages/ez-ipupdate/files/init')
-rw-r--r-- | packages/ez-ipupdate/files/init | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/packages/ez-ipupdate/files/init b/packages/ez-ipupdate/files/init new file mode 100644 index 0000000000..031c33c79b --- /dev/null +++ b/packages/ez-ipupdate/files/init @@ -0,0 +1,44 @@ +#!/bin/sh +# +# ipupdate init.d script for ez-ipupdate +# +# You *must* create or update the /etc/ipupdate.conf file for +# this to work +CONF=/etc/ipupdate.conf +PIDFILE=/var/run/ipupdate.pid +test -x /usr/bin/ez-ipupdate -a -r "${CONF}" || exit 0 +if egrep '^service-type=<type of service>$' "${CONF}" >/dev/null +then + # conf file not editted + exit 0 +fi + +case "$1" in + start) + echo -n "Starting ez-ipupdate: " + start-stop-daemon --start -x /usr/bin/ez-ipupdate -- -c "${CONF}" -d -F "${PIDFILE}" "$@" + echo "done" + ;; + stop) + echo -n "Stopping ez-ipupdate: " + start-stop-daemon --stop -s 3 -p "${PIDFILE}" + echo "done" + ;; + restart) + echo -n "Restarting ez-ipupdate: " + start-stop-daemon --stop -s 3 -p "${PIDFILE}" + start-stop-daemon --start -x /usr/bin/ez-ipupdate -- -c "${CONF}" -d -F "${PIDFILE}" "$@" + echo "done" + ;; + force-reload|reload) + # HUP causes a reload, a simple TERM causes the daemon + # to wake up and re-update the IP address + start-stop-daemon --stop -s 1 -p "${PIDFILE}" + ;; + *) + echo "Usage: ipupdate { start | stop | restart | reload }" >&2 + exit 1 + ;; +esac + +exit 0 |