ddclient/ddclient.initscript
cvsextras dd98616bc4 auto-import changelog data from ddclient-3.6.3-0.fdr.4.1.src.rpm
3.6.3-0.fdr.4.fc1
- Fix %doc %attr ownership
- Touch the cache file in %post
3.6.3-0.fdr.3
- Add own Fedora-style initscript and /etc/sysconfig/ddclient file.
- Fix file permissions of config file and example files.
- Since ddclient.cache.patch uses hardcoded /var, don't use %_localstatedir
    in spec file either.
Sun Sep 07 2003 Thomas Vander Stichele <thomas at apestaart dot org>
- 0:3.6.3-0.fdr.2: fixed ghostness of cache file
2004-11-08 04:12:32 +00:00

77 lines
1.3 KiB
Bash
Executable file

#!/bin/sh
#
# ddclient This shell script takes care of starting and stopping ddclient.
#
# chkconfig: 345 65 35
# description: ddclient provides support for updating dynamic DNS services
# processname: ddclient
# config: /etc/sysconfig/ddclient
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ "$NETWORKING" = "no" ] && exit 0
. /etc/sysconfig/ddclient
exec="/usr/sbin/ddclient"
prog=$(basename $exec)
lockfile=/var/lock/subsys/$prog
start() {
echo -n $"Starting $prog: "
daemon $exec $DDCLIENT_OPTIONS
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
echo -n $"Stopping $prog: "
killproc $prog
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}
restart() {
stop
start
}
reload() {
restart
}
force_reload() {
restart
}
fdrstatus() {
status $prog
}
# See how we were called.
case "$1" in
start|stop|restart|reload)
$1
;;
force-reload)
force_reload
;;
status)
fdrstatus
;;
condrestart)
[ ! -f $lockfile ] || restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|force-reload}"
exit 2
esac