OSDN Git Service

doc/heartbeat-ra: Purge SSLProxy, VIPcheck
[ultramonkey-l7/ultramonkey-l7-v2.git] / init.d / l7vsd
index 35b2161..5a33d1d 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Start/Stop script for l7vsd
 #
-# chkconfig: 2345 95 34
+# chkconfig: - 95 34
 # description: Start and stop l7vsd
 #              
 # processname: l7vsd
 # Released: January 2008
 # Licence: GNU General Public Licence
 
-# Source function library.
-. /etc/rc.d/init.d/functions
 
+# If you change L7VSD_OPTIONS, you must edit Resource Agents.
+# Please read "doc/heartbeat-ra/README" in detail.
+#
 #L7VSD_OPTIONS=""              # run as non-blocking mode
 L7VSD_OPTIONS="-b"             # run as blocking mode
 
@@ -34,16 +35,15 @@ start() {
     fi
 
     ulimit -n 65536
-    echo -n $"Starting $PROG: "
-    daemon $DAEMON $L7VSD_OPTIONS
+    echo -n "Starting $PROG: " 
+    `$DAEMON $L7VSD_OPTIONS`
     RETVAL=$?
 
-    echo
-
     if [ $RETVAL -ne 0 ]; then
        echo "error occured."
        echo "$PROG was not started."
     else
+       echo "done."
        pidof $PROG > $PIDFILE
        touch $LOCKFILE
     fi
@@ -60,13 +60,12 @@ stop() {
        return
     fi
 
-    echo -n $"Stopping $PROG: "
-    killproc $DAEMON
+    echo -n "Stopping $PROG: "
+    kill $PID
     RETVAL=$?
-
-    echo
     
     if [ $RETVAL -eq 0 ]; then
+       echo "done."
        cleanup
     fi