]> git.pld-linux.org Git - packages/memcached.git/commitdiff
- added try-restart auto/th/memcached-1_2_6-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 29 Nov 2008 11:31:27 +0000 (11:31 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    memcached.init -> 1.7

memcached.init

index 9896f12632f1e25d1b34682a9affff8ac929aff3..74984c1640fd45a1c5ae3fe283dbc309eff0ba0b 100644 (file)
@@ -66,22 +66,31 @@ stop() {
        fi
 }
 
+condrestart() {
+       if [ -f /var/lock/subsys/memcached ]; then
+               stop
+               start
+       else
+               msg_not_running memcached
+               RETVAL=$1
+       fi
+}
+
 RETVAL=0
 # See how we were called.
 case "$1" in
   start)
-       start
+       start
        ;;
   stop)
-       stop
+       stop
        ;;
   restart)
        stop
        start
        ;;
-  status)
-       status memcached
-       exit $?
+  try-restart)
+       condrestart 0
        ;;
   reload|force-reload)
        if [ -f /var/lock/subsys/memcached ]; then
@@ -93,8 +102,12 @@ case "$1" in
                RETVAL=7
        fi
        ;;
+  status)
+       status memcached
+       exit $?
+       ;;
   *)
-       msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
+       msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"
        exit 3
 esac
 
This page took 0.100085 seconds and 4 git commands to generate.