OSDN Git Service

Port range check was implemented.
[ultramonkey-l7/ultramonkey-l7-v2.git] / init.d / l7vsd
index 35b2161..ff78711 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
@@ -10,9 +10,6 @@
 # Released: January 2008
 # Licence: GNU General Public Licence
 
-# Source function library.
-. /etc/rc.d/init.d/functions
-
 #L7VSD_OPTIONS=""              # run as non-blocking mode
 L7VSD_OPTIONS="-b"             # run as blocking mode
 
@@ -34,16 +31,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 +56,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