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 [ -f /etc/sysconfig/ddclient ] && . /etc/sysconfig/ddclient
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 "Dynamic DNS Client"
30 # Check if the service is already running?
31 if [ -f /var/lock/subsys/ddclient ]; then
32 msg_already_running "Dynamic DNS Client"
36 msg_starting "Dynamic DNS Client"
37 interval=$(awk -F= '{gsub(/[ \t]*#.*/, "")} $1 == "daemon" {print $2}' /etc/ddclient/ddclient.conf)
38 daemon /usr/sbin/ddclient -daemon ${interval:-300}
40 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ddclient
44 if [ ! -f /var/lock/subsys/ddclient ]; then
45 msg_not_running "Dynamic DNS Client"
49 msg_stopping "Dynamic DNS Client"
51 rm -f /var/run/ddclient.pid /var/lock/subsys/ddclient >/dev/null 2>&1
55 if [ ! -f /var/lock/subsys/ddclient ]; then
56 msg_not_running "Dynamic DNS Client"
61 msg_reloading "Dynamic DNS Client"
62 killproc ddclient -HUP
67 # See how we were called.
87 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"