Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 6858a8fef24c01a10aab8a3f9eb81cc4 > files > 19

ddclient-3.8.0-2mdv2009.1.noarch.rpm

#!/bin/sh
# $Id: sample-etc_rc.d_init.d_ddclient.redhat 98 2008-06-13 20:26:56Z wimpunk $
# ddclient      This shell script takes care of starting and stopping
#               ddclient.
#
# chkconfig: 2345 65 35
# description: ddclient provides support for updating dynamic DNS services.
### BEGIN INIT INFO
# Provides:          ddclient
# Required-Start:    $syslog $remote_fs $network
# 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


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

. /etc/rc.d/init.d/functions

# See how we were called.
case "$1" in
  start)
	# Start daemon.
	echo -n "Starting ddclient: "
	touch /var/lock/subsys/ddclient
	daemon ddclient -daemon 300
	echo    
	;;
  stop)
	# Stop daemon.
	echo -n "Shutting down ddclient: "
	killproc ddclient
	echo
	rm -f /var/lock/subsys/ddclient
	;;
  restart)
	$0 stop
	$0 start
	;;
  status)
	status ddclient
	;;
  *)
	echo "Usage: ddclient {start|stop|restart|status}"
	exit 1
esac

exit 0