-#!/bin/sh
+#!/bin/sh
# Start/Stop script for l7vsd
#
# chkconfig: - 95 34
PROCS=`ps ax | grep $DAEMON | grep -v grep | wc -l`
if [ $PROCS -ne 0 ]; then
echo "$PROG is running."
- RETVAL=-1
- return
+ RETVAL=255
+ return $RETVAL
fi
cleanup
fi
PID=`pidof l7vsd`
if [ -z $PID ]; then
echo "$PROG is not running."
- RETVAL=-1
+ RETVAL=255
cleanup
- return
+ return $RETVAL
fi
echo -n "Stopping $PROG: "
status() {
if [ ! -e $PIDFILE ]; then
echo "$PROG is not running."
- RETVAL=-1
+ RETVAL=255
else
echo -n "$PROG running with pid: "
cat $PIDFILE
# Prefer for Running script
if [ ! -x $DAEMON ]; then
echo "$DAEMON does not exist!"
- exit -1
+ RETVAL=255
+ exit $RETVAL
fi
case "$1" in
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
- RETVAL=-1
+ RETVAL=255
esac