#!/bin/sh # Copyright (c) 2005-2006 SUSE Linux AG, Nuernberg, Germany. # All rights reserved. # # Author: Klaus Singvogel. # Please send feedback to http://www.suse.de/feedback # # ddclient This shell script takes care of starting and stopping # ddclient. # # ### BEGIN INIT INFO # Provides: ddclient # Required-Start: $syslog $local_fs $network # Should-Start: $time ypbind sendmail $remote_fs # Required-Stop: $syslog $local_fs # Should-Stop: $time ypbind sendmail $remote_fs # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: ddclient a daemon to update dynamic DNS entries # 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 # # Source SuSE config, only if exists with size greater zero test -s /etc/rc.status && . /etc/rc.status DDCLIENT_CONFIG=/etc/ddclient.conf DDCLIENT_BIN=/usr/sbin/ddclient test -s "$DDCLIENT_CONFIG" || exit 6 rc_reset case "$1" in start) echo -n "Starting ddclient daemon" startproc "$DDCLIENT_BIN" -daemon 300 rc_status -v ;; stop) echo -n "Shutting down ddclient daemon" killproc -TERM `basename "$DDCLIENT_BIN"` rc_status -v ;; try-restart) $0 status >/dev/null && $0 restart # Remember status and be quiet rc_status ;; restart) $0 stop $0 start rc_status ;; force-reload) # echo -n "Reload service ddclient" rc_failed 3 rc_status -v ;; reload) rc_failed 3 rc_status -v ;; status) echo -n "Checking for service ddclient " checkproc `basename "$DDCLIENT_BIN"` rc_status -v ;; *) echo "Usage: ddclient {start|stop|try-restart|restart|status}" exit 1 esac rc_exit