]> git.pld-linux.org Git - packages/arpwatch.git/blob - arpwatch.init
This commit was manufactured by cvs2git to create tag 'arpwatch-2_1a11-6'.
[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 [ "${NETWORKING}" = "no" ] && echo "Error: Networking is down" && exit 0
20
21
22 # See how we were called.
23 case "$1" in
24   start)
25         # Check if the service is already running?
26         if [ ! -f /var/lock/subsys/arpwatch ]; then
27                 show Starting arpwatch
28                 daemon arpwatch
29         else
30                 echo "arpwatch already is running"
31         fi
32         touch /var/lock/subsys/arpwatch
33         ;;
34   stop)
35         show Stopping arpwatch
36         killproc arpwatch
37         rm -f /var/lock/subsys/arpwatch
38         ;;
39   status)
40         status arpwatch
41         ;;
42   restart|reload)
43         $0 stop
44         $0 start
45         ;;
46   *)
47         echo "Usage: $0 {start|stop|status|restart|reload}"
48         exit 1
49 esac
50
51 exit 0
This page took 0.02638 seconds and 3 git commands to generate.