From: <bl...@us...> - 2003-12-30 20:40:20
|
Update of /cvsroot/devil-linux/build/scripts/scripts In directory sc8-pr-cvs1:/tmp/cvs-serv18657/scripts Added Files: noip_updater Log Message: Added init script for the noip_updater (dynamic DNS service no-ip.com) --- NEW FILE: noip_updater --- #!/bin/bash # # $Source: /cvsroot/devil-linux/build/scripts/scripts/noip_updater,v $ # $Revision: 1.1 $ # $Date: 2003/12/30 20:40:15 $ # # http://www.devil-linux.org # ### BEGIN INIT INFO # Provides: noip_updater # Required-Start: $network $syslog # Required-Stop: $network $syslog # Default-Start: # Default-Stop: # Description: starts noip_updater ### END INIT INFO # settings source /etc/sysconfig/config # parameters NAME="NOIP dynamic DNS update service" CONFIGNAME=NOIP_UPDATER DAEMON=/usr/bin/noip CONFIGFILE="/etc/no-ip.conf" PARAMETER="-c $CONFIGFILE" # source function library source /etc/init.d/functions eval START=\$START_$CONFIGNAME # Determine the base and follow a runlevel link name. base=${0##*/} link=${base#*[SK][0-9][0-9]} # Force execution if not called by a runlevel directory. test $link = $base && START=yes test "$START" = "yes" || exit 0 if [ ! -e $DAEMON ]; then echo echo "$DAEMON not found. Did you install the package?" exit 1 fi if [ ! -f $CONFIGFILE ]; then echo echo "Configuration: $CONFIGFILE not found." exit 1 fi case "$1" in start) echo -n "Starting $NAME: " loadproc $DAEMON $PARAMETER ;; stop) echo -n "Shutting down $NAME: " killproc $DAEMON ;; restart) $0 stop sleep 1 $0 start ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 ;; esac |