diff options
author | Remi Collet <fedora@famillecollet.com> | 2010-06-13 15:01:36 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2010-06-13 15:01:36 +0200 |
commit | 00288b2e6b4da3ff6d87f5e1db088b97016fea1d (patch) | |
tree | 018226d4bdbce0f7bf9980af58cd1bd9c703ebae /memcached.sysvel4 | |
parent | 76aae763f716bd206e365ed2b48bfa013539785e (diff) |
sync with rawhide
Diffstat (limited to 'memcached.sysvel4')
-rwxr-xr-x | memcached.sysvel4 | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/memcached.sysvel4 b/memcached.sysvel4 index 3b9502e..f53c769 100755 --- a/memcached.sysvel4 +++ b/memcached.sysvel4 @@ -32,23 +32,23 @@ fi RETVAL=0 prog="memcached" +pidfile=${PIDFILE-/var/run/memcached.pid} +lockfile=${LOCKFILE-/var/lock/subsys/memcached} start () { echo -n $"Starting $prog: " - - daemon memcached -d -p $PORT -u $USER -m $CACHESIZE -c $MAXCONN -P /var/run/memcached.pid $OPTIONS + daemon memcached -d -p $PORT -u $USER -m $CACHESIZE -c $MAXCONN -P ${pidfile} $OPTIONS RETVAL=$? echo - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/memcached + [ $RETVAL -eq 0 ] && touch ${lockfile} } stop () { echo -n $"Stopping $prog: " - killproc memcached + killproc /usr/bin/memcached RETVAL=$? echo if [ $RETVAL -eq 0 ] ; then - rm -f /var/lock/subsys/memcached - rm -f /var/run/memcached.pid + rm -f ${lockfile} ${pidfile} fi } @@ -68,16 +68,18 @@ case "$1" in ;; status) status memcached + RETVAL=$? ;; restart|reload|force-reload) restart ;; - condrestart) - [ -f /var/lock/subsys/memcached ] && restart || : + condrestart|try-restart) + [ -f ${lockfile} ] && restart || : ;; *) - echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}" - exit 1 + echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart|try-restart}" + RETVAL=2 + ;; esac -exit $? +exit $RETVAL |