]> git.pld-linux.org Git - packages/ddclient.git/commitdiff
1773aaf469a1faddd3f20d485a0fd6f2 ddclient-3.6.3.tar.gz
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 14 May 2003 12:37:49 +0000 (12:37 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    ddclient.init -> 1.1

ddclient.init [new file with mode: 0644]

diff --git a/ddclient.init b/ddclient.init
new file mode 100644 (file)
index 0000000..da96dc4
--- /dev/null
@@ -0,0 +1,76 @@
+#!/bin/sh
+#
+# ddclient             ddclient (secure shell daemon)
+#
+# chkconfig:   345 55 45
+#
+# description: ddclient - dynamic dns client
+
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+# Get service config
+[ -f /etc/sysconfig/ddclient ] && . /etc/sysconfig/ddclient
+
+# Check that networking is up.
+if is_yes "${NETWORKING}"; then
+       if [ ! -f /var/lock/subsys/network ]; then
+               msg_network_down "Dynamic DNS Client"
+               exit 1
+       fi
+else
+       exit 0
+fi
+                       
+
+# See how we were called.
+case "$1" in
+  start)
+       # Check if the service is already running?
+       if [ ! -f /var/lock/subsys/ddclient ]; then
+               msg_starting "Dynamic DNS Client"
+               daemon /usr/sbin/ddclient -daemon 300
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ddclient            
+       else
+               msg_already_running "Dynamic DNS Client"
+       fi
+       ;;
+  stop)
+       if [ -f /var/lock/subsys/ddclient ]; then
+               msg_stopping "Dynamic DNS Client"
+               killproc ddclient
+               rm -f /var/run/ddclient.pid /var/lock/subsys/ddclient >/dev/null 2>&1
+       else
+               msg_not_running "Dynamic DNS Client"
+               exit 1
+       fi      
+       ;;
+  restart)
+       $0 stop
+       $0 start
+       ;;
+  status)
+       status ddclient
+       exit $?
+       ;;
+  reload)
+       if [ -f /var/lock/subsys/ddclient ]; then
+               msg_reloading "Dynamic DNS Client"
+               killproc ddclient -HUP
+               RETVAL=$?
+       else
+               msg_not_running "Dynamic DNS Client"
+               exit 1
+       fi
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|reload|status}"
+       exit 1
+esac
+
+exit $RETVAL
This page took 0.353505 seconds and 4 git commands to generate.