#!/bin/sh # # /etc/init.d/rc.d/prelude-lml # # chkconfig: - 95 5 # description: The Prelude Log Monitoring Lackey (LML) # is the host-based sensor program part # of the Prelude Hybrid IDS suite. # # processname: prelude-lml # config: /etc/prelude/prelude-lml/prelude-lml.conf # pidfile: /var/run/prelude-lml.pid # Do not load RH compatibility interface. WITHOUT_RC_COMPAT=1 # Source function library. . /etc/init.d/functions # Get config. CONFIG=/etc/sysconfig/prelude-lml SourceIfNotEmpty "$CONFIG" RETVAL=0 start() { PIDFILE=/var/run/prelude-lml.pid LOCKFILE=/var/lock/subsys/prelude-lml start_daemon --pidfile "$PIDFILE" \ --lockfile "$LOCKFILE" \ --expect-user root -- \ prelude-lml --daemon --pidfile "$PIDFILE" "$OPTIONS" RETVAL=$? return $RETVAL } stop() { PIDFILE=/var/run/prelude-lml.pid LOCKFILE=/var/lock/subsys/prelude-lml stop_daemon --pidfile "$PIDFILE" \ --lockfile "$LOCKFILE" \ --expect-user root -- \ prelude-lml RETVAL=$? return $RETVAL } restart() { stop start } # See how we were called. case "$1" in start) start ;; stop) stop ;; restart|reload) restart ;; condstop) if [ -e "$LOCKFILE" ]; then stop fi ;; condrestart) if [ -e "$LOCKFILE" ]; then restart fi ;; condreload) if [ -e "$LOCKFILE" ]; then restart fi ;; status) PIDFILE=/var/run/prelude-lml.pid status --pidfile "$PIDFILE" --expect-user root -- prelude-lml RETVAL=$? ;; *) msg_usage "${0##*/} {start|stop|reload|restart|condstop|condrestart|condreload|status}" RETVAL=1 esac exit $RETVAL