Use JSON::PP instead of the (deprecated) JSON::Any
[ddclient.git] / sample-etc_rc.d_init.d_ddclient.lsb
blob7252d3ffff285aefce855f5291c9a01a995606d6
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 # Above is for RedHat and now the LSB part
10 ### BEGIN INIT INFO
11 # Provides: ddclient
12 # Required-Start: $syslog $remote_fs
13 # Should-Start: $time ypbind sendmail
14 # Required-Stop: $syslog $remote_fs
15 # Should-Stop: $time ypbind sendmail
16 # Default-Start: 3 5
17 # Default-Stop: 0 1 2 6
18 # Short-Description: ddclient provides support for updating dynamic DNS services
19 # Description: ddclient is a Perl client used to update dynamic DNS
20 # entries for accounts on many dynamic DNS services and
21 # can be used on many types of firewalls
22 ### END INIT INFO
24 ###
26 [ -f /etc/ddclient/ddclient.conf ] || exit 0
28 DDCLIENT_BIN=/usr/sbin/ddclient
31 # LSB Standard (SuSE,RedHat,...)
33 if [ -f /lib/lsb/init-functions ] ; then
34 . /lib/lsb/init-functions
37 # See how we were called.
38 case "$1" in
39 start)
40 echo -n "Starting ddclient "
41 start_daemon $DDCLIENT_BIN -daemon 300
42 rc_status -v
44 stop)
45 echo -n "Shutting down ddclient "
46 killproc -TERM `basename $DDCLIENT_BIN`
47 rc_status -v
49 restart)
50 $0 stop
51 $0 start
52 rc_status
54 status)
55 echo -n "Checking for service ddclient "
56 checkproc `basename $DDCLIENT_BIN`w
57 rc_status -v
60 echo "Usage: ddclient {start|stop|restart|status}"
61 exit 1
62 esac
64 exit 0