]> git.pld-linux.org Git - packages/arpwatch.git/blame - arpwatch.init
- Standarized all rc scripts.
[packages/arpwatch.git] / arpwatch.init
CommitLineData
cd77786f 1#!/bin/sh
7b0d0d3a
AF
2#
3# chkconfig: - 55 45
4# description: The arpwatch daemon attempts to keep track of ethernet/ip \
5# address pairings.
6# processname: arpwatch
7
63276756 8
9# Source function library
7b0d0d3a
AF
10. /etc/rc.d/init.d/functions
11
63276756 12# Get network config
7b0d0d3a
AF
13. /etc/sysconfig/network
14
63276756 15# Get service config
16[ -f /etc/sysconfig/arpwatch ] && . /etc/sysconfig/arpwatch
17
7b0d0d3a 18# Check that networking is up.
63276756 19[ "${NETWORKING}" = "no" ] && echo "Error: Networking is down" && exit 0
20
7b0d0d3a
AF
21
22# See how we were called.
23case "$1" in
24 start)
63276756 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
7b0d0d3a
AF
32 touch /var/lock/subsys/arpwatch
33 ;;
34 stop)
63276756 35 show Stopping arpwatch
7b0d0d3a
AF
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 *)
cd77786f 47 echo "Usage: $0 {start|stop|status|restart|reload}"
7b0d0d3a
AF
48 exit 1
49esac
50
51exit 0
This page took 0.06975 seconds and 4 git commands to generate.