]> git.pld-linux.org Git - packages/fetchmail.git/commitdiff
- use functions auto/ac/fetchmail-6_3_5-1 auto/th/fetchmail-6_3_5-1
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 12 Oct 2006 20:50:44 +0000 (20:50 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    fetchmail.init -> 1.16

fetchmail.init

index 3cb2f8308769a77b8fd03205a78143bb9c64c40c..9992a679d8b9fae7019c1c0bec5c7a538c19a7bc 100644 (file)
@@ -33,10 +33,7 @@ fi
 # Check that fetchmailrc exists.
 [ -f /etc/fetchmailrc ] || exit 0
 
-RETVAL=0
-# See how we were called.
-case "$1" in
-  start)
+start() {
        if [ ! -f /var/lock/subsys/fetchmail ]; then
                msg_starting "fetchmail"
 
@@ -48,8 +45,9 @@ case "$1" in
        else
                msg_already_running fetchmail
        fi
-       ;;
-  stop)
+}
+
+stop() {
        if [ -f /var/lock/subsys/fetchmail ]; then
                msg_stopping "fetchmail"
                killproc fetchmail
@@ -57,11 +55,20 @@ case "$1" in
        else
                msg_not_running "fetchmail"
        fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
        ;;
   restart)
-       $0 stop
-       $0 start
-       exit $?
+       stop
+       start
        ;;
   reload|force-reload)
        if [ -f /var/lock/subsys/fetchmail ]; then
This page took 0.117982 seconds and 4 git commands to generate.