diff options
author | Remi Collet <fedora@famillecollet.com> | 2010-06-15 18:23:58 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2010-06-15 18:23:58 +0200 |
commit | 879d9305cddf8a129df8903265edd1347dbded69 (patch) | |
tree | d13a3de0c6baa8e744af11138b652e4710c4393d /memcached.sysvel4 | |
parent | 00288b2e6b4da3ff6d87f5e1db088b97016fea1d (diff) |
also use /var/run/memcached/memcached.pid on EL-4
Diffstat (limited to 'memcached.sysvel4')
-rwxr-xr-x | memcached.sysvel4 | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/memcached.sysvel4 b/memcached.sysvel4 index f53c769..fd606a0 100755 --- a/memcached.sysvel4 +++ b/memcached.sysvel4 @@ -4,7 +4,7 @@ # description: The memcached daemon is a network memory cache service. # processname: memcached # config: /etc/sysconfig/memcached -# pidfile: /var/run/memcached.pid +# pidfile: /var/run/memcached/memcached.pid # Standard LSB functions #. /lib/lsb/init-functions @@ -32,11 +32,16 @@ fi RETVAL=0 prog="memcached" -pidfile=${PIDFILE-/var/run/memcached.pid} +pidfile=${PIDFILE-/var/run/memcached/memcached.pid} lockfile=${LOCKFILE-/var/lock/subsys/memcached} start () { echo -n $"Starting $prog: " + # Ensure that /var/run/memcached has proper permissions + if [ "`stat -c %U /var/run/memcached`" != "$USER" ]; then + chown $USER /var/run/memcached + fi + daemon memcached -d -p $PORT -u $USER -m $CACHESIZE -c $MAXCONN -P ${pidfile} $OPTIONS RETVAL=$? echo |