File: sample-etc_rc.d_init.d_ddclient.lsb

package info (click to toggle)
ddclient 3.8.0-11.5
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,532 kB
  • sloc: perl: 21,106; sh: 626; xml: 55; makefile: 44
file content (66 lines) | stat: -rwxr-xr-x 1,693 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/sh
#
# ddclient      This shell script takes care of starting and stopping
#               ddclient.
#
# chkconfig: 2345 65 35
# description: ddclient provides support for updating dynamic DNS services.
#
# Above is for RedHat and now the LSB part
### BEGIN INIT INFO
# Provides:          ddclient
# Required-Start:    $syslog $remote_fs
# Should-Start: $time ypbind sendmail
# Required-Stop:     $syslog $remote_fs
# Should-Stop: $time ypbind sendmail
# Default-Start:     3 5
# Default-Stop:      0 1 2 6
# Short-Description: ddclient provides support for updating dynamic DNS services
# Description:       ddclient is a Perl client used to update dynamic DNS
#                    entries for accounts on many dynamic DNS services and
#                    can be used on many types of firewalls
### END INIT INFO
# 
# $Id: sample-etc_rc.d_init.d_ddclient.lsb 98 2008-06-13 20:26:56Z wimpunk $
#
###

[ -f /etc/ddclient/ddclient.conf ] || exit 0

DDCLIENT_BIN=/usr/sbin/ddclient

#
# LSB Standard (SuSE,RedHat,...)
#
if [ -f /lib/lsb/init-functions ] ; then
   . /lib/lsb/init-functions
fi

# See how we were called.
case "$1" in
  start)
        echo -n "Starting ddclient "
        start_daemon $DDCLIENT_BIN -daemon 300
        rc_status -v
        ;;
  stop)
        echo -n "Shutting down ddclient "
        killproc -TERM `basename $DDCLIENT_BIN`
        rc_status -v
        ;;
  restart)
        $0 stop
        $0 start
        rc_status
        ;;
  status)
        echo -n "Checking for service ddclient "
        checkproc `basename $DDCLIENT_BIN`w
        rc_status -v
        ;;
  *)
        echo "Usage: ddclient {start|stop|restart|status}"
        exit 1
esac

exit 0