Preparing the release of v3.9.0
[ddclient.git] / sample-etc_rc.d_init.d_ddclient.redhat
blob2e0fd321804f444b43f12a718a780f4294191094
1 #!/bin/sh
3 # ddclient This shell script takes care of starting and stopping
4 # ddclient.
6 # chkconfig: 2345 65 35
7 # description: ddclient provides support for updating dynamic DNS services.
9 [ -f /etc/ddclient/ddclient.conf ] || exit 0
11 . /etc/rc.d/init.d/functions
13 # See how we were called.
14 case "$1" in
15 start)
16 # Start daemon.
17 echo -n "Starting ddclient: "
18 touch /var/lock/subsys/ddclient
19 daemon ddclient -daemon 300
20 echo
22 stop)
23 # Stop daemon.
24 echo -n "Shutting down ddclient: "
25 killproc ddclient
26 echo
27 rm -f /var/lock/subsys/ddclient
29 restart)
30 $0 stop
31 $0 start
33 status)
34 status ddclient
37 echo "Usage: ddclient {start|stop|restart|status}"
38 exit 1
39 esac
41 exit 0