3 # ez-ipupdate ez-ipupdate (secure shell daemon)
7 # description: ez-ipupdate - dynamic dns client
10 # Source function library
11 . /etc/rc.d/init.d/functions
14 . /etc/sysconfig/network
16 PROGRAM_ARGS="-d -c /etc/ez-ipupdate.conf"
18 [ -f /etc/sysconfig/ez-ipupdate ] && . /etc/sysconfig/ez-ipupdate
20 # Check that networking is up.
21 if is_yes "${NETWORKING}"; then
22 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
23 msg_network_down "ez-ipupdate dynamic dns client"
31 # See how we were called.
34 # Check if the service is already running?
35 if [ ! -f /var/lock/subsys/ez-ipupdate ]; then
36 msg_starting "ez-ipupdate dynamic dns client"
37 daemon /usr/bin/ez-ipupdate $PROGRAM_ARGS
39 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ez-ipupdate
41 msg_already_running "ez-ipupdate dynamic dns client"
45 if [ -f /var/lock/subsys/ez-ipupdate ]; then
46 msg_stopping "ez-ipupdate dynamic dns client"
47 killproc ez-ipupdate -QUIT
48 rm -f /var/run/ez-ipupdate.pid /var/lock/subsys/ez-ipupdate >/dev/null 2>&1
50 msg_not_running "ez-ipupdate dynamic dns client"
61 ez_cache=$(grep -E '^[[:space:]]*cache-file' /etc/ez-ipupdate.conf | cut -d "=" -f2)
62 LAST_IP=$(cat $ez_cache | cut -d "," -f2)
63 echo "Last IP update: $LAST_IP"
67 msg_usage "$0 {start|stop|restart|force-reload|status}"