Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > b6c04112cc9a9f62a44c5755eb215e7f > files > 65

prelude-lml-0.9.11-1mdv2008.1.x86_64.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.

# 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)
	gprintf "Starting prelude-lml: "
	daemon /usr/sbin/prelude-lml --daemon --pidfile /var/run/prelude-lml.pid
	RETVAL=$?
	echo
	touch /var/lock/subsys/prelude-lml
	;;

  stop)
	gprintf "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
	;;
	
  *)
	gprintf "Usage: %s {start|stop|restart|reload|status}\n" "$0"
	exit 1
esac

exit $RETVAL