#!/bin/sh # # Startup script for arpalert. This script points # to the standard arpalert location in /usr/local/arpalert # This can be changed at the variable ARPALERTHOME. # Author: Robert Perriero (robert.perriero@gmail.com) # Date: 03/28/06 # Date: 09/05/06 : Thierry FOURNIER : # Include the script in the standard package # # chkconfig: - 55 45 # description: The arpalert daemon attempts to keep track of ethernet/ip \ # address pairings. # processname: arpalert # Source function library. . /etc/init.d/functions prog="arpalert" start() { if [ ! -f /var/run/arpalert.lock ]; then echo -n $"Starting $prog: " daemon arpalert -d RETVAL=$? [ $RETVAL -eq 0 ] && touch /var/run/arpalert.lock echo fi return $RETVAL } stop() { if test "x`pidof arpalert`" != x; then echo -n $"Stopping $prog: " killproc arpalert echo fi RETVAL=$? [ $RETVAL = 0 ] && rm -rf /var/run/arpalert.lock return $RETVAL } case "$1" in start) start ;; stop) stop ;; status) status arpalert RETVAL=$? ;; restart|reload) stop start ;; *) echo "Usage: $0 {start|stop|status|restart|reload}" exit 1 ;; esac exit $?