]> git.pld-linux.org Git - packages/vsftpd.git/commitdiff
- use functions
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 6 Nov 2006 18:31:35 +0000 (18:31 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    vsftpd.init -> 1.4

vsftpd.init

index 1d8a04e02ab7b6d595eed82ea6cfe9882acf2e61..811b710023f022192c25b32d401c8e322915d747 100644 (file)
@@ -22,10 +22,7 @@ else
        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/vsftpd ]; then
                # Check if we have 'Listen=yes' in config
@@ -42,8 +39,9 @@ case "$1" in
        else
                msg_already_running vsftpd
        fi
-       ;;
-  stop)
+}
+
+stop() {
        # Stop daemons.
        if [ -f /var/lock/subsys/vsftpd ]; then
                msg_stopping vsftpd
@@ -52,11 +50,20 @@ case "$1" in
        else
                msg_not_running vsftpd
        fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
        ;;
   restart|force-reload)
-       $0 stop
-       $0 start
-       exit $?
+       stop
+       start
        ;;
   *)
        msg_usage "$0 {start|stop|restart|force-reload}"
This page took 0.046702 seconds and 4 git commands to generate.