3 # ddclient ddclient (secure shell daemon)
7 # description: ddclient - dynamic dns client
10 # Source function library
11 . /etc/rc.d/init.d/functions
14 . /etc/sysconfig/network
17 DDCLIENT_OPTIONS="-daemon 300"
18 [ -f /etc/sysconfig/ddclient ] && . /etc/sysconfig/ddclient
20 pidfile=/var/run/ddclient/ddclient.pid
22 # Check that networking is up.
23 if is_yes "${NETWORKING}"; then
24 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
25 msg_network_down "Dynamic DNS Client"
33 # Check if the service is already running?
34 if [ -f /var/lock/subsys/ddclient ]; then
35 msg_already_running "Dynamic DNS Client"
39 msg_starting "Dynamic DNS Client"
40 daemon --user ddclient /usr/sbin/ddclient -pid $pidfile $DDCLIENT_OPTIONS
42 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ddclient
46 if [ ! -f /var/lock/subsys/ddclient ]; then
47 msg_not_running "Dynamic DNS Client"
51 msg_stopping "Dynamic DNS Client"
52 killproc --pidfile $pidfile ddclient
53 rm -f $pidfile /var/lock/subsys/ddclient >/dev/null 2>&1
57 if [ ! -f /var/lock/subsys/ddclient ]; then
58 msg_not_running "Dynamic DNS Client"
63 msg_reloading "Dynamic DNS Client"
64 killproc ddclient -HUP
69 # See how we were called.
85 status --pidfile $pidfile ddclient
89 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"