#!/bin/sh # # chkconfig: - 55 45 # description: The arpwatch daemon attempts to keep track of ethernet/ip \ # address pairings. # processname: arpwatch # Source function library . /etc/rc.d/init.d/functions # Get network config . /etc/sysconfig/network # Get service config [ -f /etc/sysconfig/arpwatch ] && . /etc/sysconfig/arpwatch # Check that networking is up. [ "${NETWORKING}" = "no" ] && echo "Error: Networking is down" && exit 0 # See how we were called. case "$1" in start) # Check if the service is already running? if [ ! -f /var/lock/subsys/arpwatch ]; then show Starting arpwatch daemon arpwatch else echo "arpwatch already is running" fi touch /var/lock/subsys/arpwatch ;; stop) show Stopping arpwatch killproc arpwatch rm -f /var/lock/subsys/arpwatch ;; status) status arpwatch ;; restart|reload) $0 stop $0 start ;; *) echo "Usage: $0 {start|stop|status|restart|reload}" exit 1 esac exit 0