2 # Start/Stop script for l7vsd
5 # description: Start and stop l7vsd
9 # Author: Shinya TAKEBAYASHI
10 # Released: January 2008
11 # License: GNU General Public License
16 DAEMON="/usr/sbin/l7vsd"
17 SOCKFILE="/var/run/l7vs/l7vs"
18 PIDFILE="/var/run/l7vsd.pid"
19 LOCKFILE="/var/lock/subsys/l7vsd"
22 if [ -e $PIDFILE ]; then
23 PROCS=`ps ax | grep $DAEMON | grep -v grep | wc -l`
24 if [ $PROCS -ne 0 ]; then
25 echo "$PROG is running."
32 echo -n "Starting $PROG: "
33 `$DAEMON $L7VSD_OPTIONS`
36 if [ $RETVAL -ne 0 ]; then
37 echo "error occurred."
38 echo "$PROG was not started."
41 pidof $PROG > $PIDFILE
42 mkdir -p `dirname $LOCKFILE`
52 echo "$PROG is not running."
58 echo -n "Stopping $PROG: "
62 if [ $RETVAL -eq 0 ]; then
71 if [ ! -e $PIDFILE ]; then
72 echo "$PROG is not running."
75 echo -n "$PROG running with pid: "
89 # Prefer for Running script
90 if [ ! -x $DAEMON ]; then
91 echo "$DAEMON does not exist!"
122 echo $"Usage: $0 {start|stop|restart|condrestart|status}"