ddclient/sample-etc_rc.d_init.d_ddclient.lsb
Steve8291 6b7800380c Adjust path to ddclient
Installing with `make install` automatically places the ddclient
executable in `/usr/bin/ddclient`. This service file has the wrong
path and that causes systemd to be unable to start ddclient.
2020-07-10 12:04:21 -04:00

64 lines
1.6 KiB
Bash
Executable file

#!/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
#
###
[ -f /etc/ddclient/ddclient.conf ] || exit 0
DDCLIENT_BIN=/usr/bin/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