Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 3d29968a38e78b251f6edccd69a287c1 > files > 3

prelude-lml-1.0.1-3.mga3.src.rpm

#!/bin/sh
#
# prelude-lml			This shell script takes care of starting and stopping
#				prelude-lml.
#
# chkconfig: 2345 81 31
# pidfile: /var/run/prelude-lml.pid
#
# description: prelude-lml is a Hybrib Network Intrusion Detection System - Log Analyzer Sensor.
### BEGIN INIT INFO
# Provides: prelude-lml
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Short-Description: Hybrib Network Intrusion Detection System - Log Analyzer Sensor
# Description: Hybrib Network Intrusion Detection System - Log Analyzer Sensor
### END INIT INFO

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ "${NETWORKING}" = "no" ] && exit 0

[ -x /usr/sbin/prelude-lml ] || exit 0

# See how we were called.
case "$1" in
  start)
	echo -n "Starting prelude-lml: "
	daemon /usr/sbin/prelude-lml --daemon --pidfile /var/run/prelude-lml.pid
	RETVAL=$?
	echo
	touch /var/lock/subsys/prelude-lml
	;;

  stop)
	echo -n "Shutting down prelude-lml: "
	killproc prelude-lml
	RETVAL=$?
	echo 
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/prelude-lml
	;;

  restart)
	$0 stop
	exec $0 start
	;;

  reload)
  	$0 restart
	;;

  status)
	status prelude-lml
	;;
	
  *)
	echo "Usage: $0 {start|stop|restart|reload|status}"
	exit 1
esac

exit $RETVAL