]> git.pld-linux.org Git - packages/arpwatch.git/blob - arpwatch.init
c2cafb6aa63038a167e46677af6431ee65aa3770
[packages/arpwatch.git] / arpwatch.init
1 #!/bin/sh
2 #
3 # chkconfig: - 55 45
4 # description:  The arpwatch daemon attempts to keep track of ethernet/ip \
5 #               address pairings.
6 # processname: arpwatch
7
8
9 # Source function library
10 . /etc/rc.d/init.d/functions
11
12 # Get network config
13 . /etc/sysconfig/network
14
15 # Get service config
16 [ -f /etc/sysconfig/arpwatch ] && . /etc/sysconfig/arpwatch
17
18 # Check that networking is up.
19 if [ "${NETWORKING}" = "no" ]; then
20         echo "WARNING: Networking is down. Arpwatch service can't be runed."
21         exit 1
22 fi
23
24
25 # See how we were called.
26 case "$1" in
27   start)
28         # Check if the service is already running?
29         if [ ! -f /var/lock/subsys/arpwatch ]; then
30                 show Starting arpwatch
31                 daemon arpwatch
32         else
33                 echo "arpwatch already is running"
34         fi
35         touch /var/lock/subsys/arpwatch
36         ;;
37   stop)
38         show Stopping arpwatch
39         killproc arpwatch
40         rm -f /var/lock/subsys/arpwatch
41         ;;
42   status)
43         status arpwatch
44         ;;
45   restart|reload)
46         $0 stop
47         $0 start
48         ;;
49   *)
50         echo "Usage: $0 {start|stop|status|restart|reload}"
51         exit 1
52 esac
53
54 exit 0
This page took 0.026459 seconds and 3 git commands to generate.