From: Diego T. <rap...@us...> - 2004-05-03 15:26:34
|
Update of /cvsroot/devil-linux/build/scripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19939/scripts/scripts Added Files: arpwatch Log Message: arpwatch scripts --- NEW FILE: arpwatch --- #!/bin/bash # ARPWATCH init.d script added by Diego Torres <rap...@an...> # from arpwatch of the RedHat Distribution ### BEGIN INIT INFO # Provides: arpwatch # Required-Start: $network $syslog # Required-Stop: $network $syslog # Default-Start: 3 5 # Default-Stop: 0 1 6 # Description: starts the arpwatch daemon ### END INIT INFO # settings source /etc/sysconfig/config # parameters NAME="arpwatch service" CONFIGNAME=ARPWATCH DAEMON=/usr/sbin/arpwatch OPTIONS= # -u <username> : defines with what user id arpwatch should run # -e <email> : the <email> where to send the reports # -s <from> : the <from>-address # 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 case "$1" in start) echo -n "Starting $NAME: " cd /etc/arpwatch ${DAEMON} ${OPTIONS} evaluate_retval ;; stop) echo -n "Shutting down $NAME " killproc ${DAEMON} ;; restart) $0 stop sleep 1 $0 start ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 esac |