]> git.pld-linux.org Git - packages/sendmail.git/commitdiff
- use functions auto/ac/sendmail-8_13_8-3 auto/th/sendmail-8_13_8-3
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 27 Dec 2006 18:23:28 +0000 (18:23 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    sendmail.init -> 1.21

sendmail.init

index 874cc81db8524679b0026f3f841d6c347702051a..40a0ba355b84020abfce31a9b880a39cf14ec78b 100644 (file)
@@ -36,10 +36,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/sendmail ]; then
                show "Prepare sendmail db"
@@ -70,8 +67,9 @@ case "$1" in
        else
                msg_already_running sm-client
        fi
-       ;;
-  stop)
+}
+
+stop() {
        if [ -f /var/lock/subsys/sendmail ]; then
                # Stop daemons.
                msg_stopping sendmail
@@ -89,11 +87,20 @@ case "$1" in
        else
                msg_not_running sm-client
        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)
        # TODO: make it better for sm-client
This page took 0.065149 seconds and 4 git commands to generate.