Files
elog/elogd.init
T
ritt af18e77c5c Small changes
SVN revision: 134
2002-06-18 11:54:14 +00:00

46 lines
752 B
Bash
Executable File

#!/bin/sh
# chkconfig: 3 90 10
# description: Start elog
# Source function library.
. /etc/rc.d/init.d/functions
# Check for the config file
if [ ! -f @PREFIX@/elog/elogd.cfg ]; then
exit 0
fi
# See how we were called.
case "$1" in
start)
echo -n "Starting elogd: "
daemon @PREFIX@/bin/elogd -D -c @PREFIX@/elog/elogd.cfg
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/routeid
echo
;;
stop)
echo ""
if [ -f /var/run/elogd.pid ] ; then
echo -n "Stoping elogd: "
/bin/kill `cat /var/run/elogd.pid`
rm -f /var/lock/subsys/elogd
echo_success
echo
fi
;;
restart|reload)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0