3 # demarcd Network monitoring daemon
6 # description: Netowk monitoring daemon which uses snort as NIDS
9 # Source function library
10 . /etc/rc.d/init.d/functions
13 . /etc/sysconfig/network
16 [ -f /etc/sysconfig/demarcd ] && . /etc/sysconfig/demarcd
18 # Check that networking is up.
19 if is_yes "${NETWORKING}"; then
20 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
21 msg_network_down demarcd
29 # See how we were called.
32 # Check if the service is already running?
33 if [ ! -f /var/lock/subsys/demarcd ]; then
37 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/demarcd
39 msg_already_running demarcd
44 if [ -f /var/lock/subsys/demarcd ]; then
46 killproc demarcd -TERM
47 rm -f /var/lock/subsys/demarcd > /dev/null 2>&1
49 msg_not_running demarcd
62 msg_usage "$0 {start|stop|restart|force-reload|status}"