]> git.pld-linux.org Git - packages/cups.git/blobdiff - cups.init
rebuild with openssl
[packages/cups.git] / cups.init
index 1dd0c42bce2281e55f8bbd74ec2ed95cbcddebd7..16693f16b3b8d99a45d077ebfd1bab2452f61413 100644 (file)
--- a/cups.init
+++ b/cups.init
@@ -1,6 +1,5 @@
 #!/bin/sh
 #
-#
 # cups         Common UNIX Printing System (CUPS)
 #
 # chkconfig:   2345 90 10
@@ -28,10 +27,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/cups ]; then
                msg_starting CUPS
@@ -41,8 +37,9 @@ case "$1" in
        else
                msg_already_running CUPS
        fi
-       ;;
-  stop)
+}
+
+stop() {
        # Stop daemons.
        if [ -f /var/lock/subsys/cups ]; then
                msg_stopping CUPS
@@ -51,11 +48,20 @@ case "$1" in
        else
                msg_not_running CUPS
        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/cups ]; then
@@ -63,7 +69,7 @@ case "$1" in
                killproc cupsd -HUP
                RETVAL=$?
        else
-               msg_not_running CUPS >&2
+               msg_not_running CUPS
                exit 7
        fi
        ;;
This page took 0.14224 seconds and 4 git commands to generate.