More elaborate version

SVN revision: 135
This commit is contained in:
Stefan Ritt 2002-06-18 12:21:22 +00:00
parent af18e77c5c
commit 893c248cb9

View File

@ -15,10 +15,23 @@ fi
# See how we were called.
case "$1" in
start)
if [ -f /var/run/elogd.pid ] ; then
pid=`cat /var/run/elogd.pid`
if [ -d /proc/$pid ] ; then
echo "elogd already running"
echo_failure
exit 1
fi
fi
echo -n "Starting elogd: "
daemon @PREFIX@/bin/elogd -D -c @PREFIX@/elog/elogd.cfg
@PREFIX@/bin/elogd -D -c @PREFIX@/elog/elogd.cfg > /dev/null 2>&1
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/routeid
if [ $RETVAL -eq 0 ] ; then
touch /var/lock/subsys/elogd
echo_success
else
echo_failure
fi
echo
;;
stop)
@ -27,8 +40,13 @@ case "$1" in
echo -n "Stoping elogd: "
/bin/kill `cat /var/run/elogd.pid`
rm -f /var/lock/subsys/elogd
rm -f /var/run/elogd.pid
echo_success
echo
else
echo -n "No elogd running?"
echo_failure
echo
fi
;;