Author: glen                         Date: Thu Apr 19 10:43:02 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- use functions

---- Files affected:
SOURCES:
   pure-ftpd.init (1.14 -> 1.15) 

---- Diffs:

================================================================
Index: SOURCES/pure-ftpd.init
diff -u SOURCES/pure-ftpd.init:1.14 SOURCES/pure-ftpd.init:1.15
--- SOURCES/pure-ftpd.init:1.14 Thu Apr 19 11:33:27 2007
+++ SOURCES/pure-ftpd.init      Thu Apr 19 12:42:57 2007
@@ -37,10 +37,7 @@
        exit 0
 fi
 
-RETVAL=0
-# See how we were called.
-case "$1" in
-  start)
+start() {
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/pure-ftpd ]; then
                msg_starting pure-ftpd
@@ -68,8 +65,9 @@
        else
                msg_already_running pure-ftpd
        fi
-       ;;
-  stop)
+}
+
+stop() {
        # Stop daemons.
        if [ -f /var/lock/subsys/pure-ftpd ]; then
                if [ -n "$UPLOADSCRIPT" ]; then
@@ -84,6 +82,16 @@
        else
                msg_not_running pure-ftpd
        fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
        ;;
   status)
        status pure-ftpd
@@ -94,9 +102,8 @@
        fi
        ;;
   restart|force-reload)
-       $0 stop
-       $0 start
-       exit $?
+       stop
+       start
        ;;
   *)
        msg_usage "$0 {start|stop|restart|force-reload|status}"
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/pure-ftpd.init?r1=1.14&r2=1.15&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to