]> git.pld-linux.org Git - packages/ez-ipupdate.git/blobdiff - ez-ipupdate.init
- rel 6; fixes from debian and new services from openwrt
[packages/ez-ipupdate.git] / ez-ipupdate.init
index ea500f45686ae5cd24e40c3b167e1b80a69fc3eb..3ece59ace9441e1b5c4f76ed65813f08f143a6d7 100644 (file)
@@ -13,6 +13,7 @@
 # Get network config
 . /etc/sysconfig/network
 
+PROGRAM_ARGS="-d -c /etc/ez-ipupdate.conf"
 # Get service config
 [ -f /etc/sysconfig/ez-ipupdate ] && . /etc/sysconfig/ez-ipupdate
 
@@ -25,7 +26,7 @@ if is_yes "${NETWORKING}"; then
 else
        exit 0
 fi
-                       
+
 RETVAL=0
 # See how we were called.
 case "$1" in
@@ -33,9 +34,9 @@ case "$1" in
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/ez-ipupdate ]; then
                msg_starting "ez-ipupdate dynamic dns client"
-               daemon /usr/sbin/ez-ipupdate -d -c /etc/ez-ipupdate.conf
+               daemon /usr/bin/ez-ipupdate $PROGRAM_ARGS
                RETVAL=$?
-               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ez-ipupdate         
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ez-ipupdate
        else
                msg_already_running "ez-ipupdate dynamic dns client"
        fi
@@ -43,13 +44,13 @@ case "$1" in
   stop)
        if [ -f /var/lock/subsys/ez-ipupdate ]; then
                msg_stopping "ez-ipupdate dynamic dns client"
-               killproc ez-ipupdate
+               killproc ez-ipupdate -QUIT
                rm -f /var/run/ez-ipupdate.pid /var/lock/subsys/ez-ipupdate >/dev/null 2>&1
        else
                msg_not_running "ez-ipupdate dynamic dns client"
-       fi      
+       fi
        ;;
-  restart)
+  restart|force-reload)
        $0 stop
        $0 start
        exit $?
@@ -62,12 +63,8 @@ case "$1" in
        echo "Last IP update: $LAST_IP"
        exit $RETVAL
        ;;
-  reload|force-reload)
-       $stop
-       $start
-       ;;
   *)
-       msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
+       msg_usage "$0 {start|stop|restart|force-reload|status}"
        exit 3
 esac
 
This page took 0.074757 seconds and 4 git commands to generate.