]> git.pld-linux.org Git - packages/eventum.git/commitdiff
- use functions
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 8 Feb 2007 23:38:30 +0000 (23:38 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    eventum-irc.init -> 1.10

eventum-irc.init

index 84dfeb5656b932197f40c01713e94bae78458259..b81be02888c99f3a8670cdf8c60c4d691fe026f3 100644 (file)
@@ -24,10 +24,7 @@ else
        exit 0
 fi
 
-RETVAL=0
-# See how we were called.
-case "$1" in
-start)
+start() {
        if [ ! -f /var/lock/subsys/eventum-irc ]; then
                msg_starting "Eventum IRC Bot"
                start-stop-daemon --start \
@@ -46,8 +43,9 @@ start)
        else
                msg_already_running "Eventum IRC Bot"
        fi
-;;
-stop)
+}
+
+stop() {
        if [ -f /var/lock/subsys/eventum-irc ]; then
                msg_stopping "Eventum IRC Bot"
                if start-stop-daemon --stop --oknodo --pidfile $PIDFILE; then
@@ -59,11 +57,20 @@ stop)
        else
                msg_not_running "Eventum IRC Bot"
        fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+start)
+       start
+;;
+stop)
+       stop
 ;;
 restart)
-       $0 stop
-       $0 start
-       exit $?
+       stop
+       start
 ;;
 status)
        status eventum-bot php
This page took 0.10445 seconds and 4 git commands to generate.