#!/bin/sh # $Id: sample-etc_rc.d_init.d_ddclient.redhat 2 2006-05-22 19:37:19Z wimpunk $ # ddclientd This shell script takes care of starting and stopping # ddclient. # # chkconfig: 2345 65 35 # description: ddclient provides support for updating dynamic DNS services. . /etc/rc.d/init.d/functions SourceIfNotEmpty /etc/sysconfig/svnserve PIDFILE=/var/run/ddclient/ddclient.pid LOCKFILE=/var/lock/subsys/ddclient CHECKTIME=60 # See how we were called. case "$1" in start) # Start daemon. start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --user dyndns --expect-user dyndns --displayname ddclient -- /usr/bin/perl /usr/sbin/ddclient -daemon "$CHECKTIME" || failure ;; stop) # Stop daemon. stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user dyndns --displayname ddclient -- /usr/bin/perl || failure ;; restart) $0 stop $0 start ;; condrestart) if [ -e "$LOCKFILE" ]; then $0 restart fi ;; status) status --pidfile "$PIDFILE" --expect-user dyndns --displayname ddclient -- /usr/bin/perl ;; *) echo "Usage: ddclientd {start|stop|restart|condrestart|status}" exit 1 esac exit 0