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
17 [ -f /etc/sysconfig/ez-ipupdate ] && . /etc/sysconfig/ez-ipupdate
19 # Check that networking is up.
20 if is_yes "${NETWORKING}"; then
21 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
22 msg_network_down "ez-ipupdate dynamic dns client"
30 # See how we were called.
33 # Check if the service is already running?
34 if [ ! -f /var/lock/subsys/ez-ipupdate ]; then
35 msg_starting "ez-ipupdate dynamic dns client"
36 daemon /usr/sbin/ez-ipupdate -d -c /etc/ez-ipupdate.conf
38 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ez-ipupdate
40 msg_already_running "ez-ipupdate dynamic dns client"
44 if [ -f /var/lock/subsys/ez-ipupdate ]; then
45 msg_stopping "ez-ipupdate dynamic dns client"
47 rm -f /var/run/ez-ipupdate.pid /var/lock/subsys/ez-ipupdate >/dev/null 2>&1
49 msg_not_running "ez-ipupdate dynamic dns client"
60 ez_cache=$(grep -E '^[[:space:]]*cache-file' /etc/ez-ipupdate.conf | cut -d "=" -f2)
61 LAST_IP=$(cat $ez_cache | cut -d "," -f2)
62 echo "Last IP update: $LAST_IP"
70 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"