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 | |
parent | 00288b2e6b4da3ff6d87f5e1db088b97016fea1d (diff) |
also use /var/run/memcached/memcached.pid on EL-4
-rw-r--r-- | memcached.spec | 10 | ||||
-rwxr-xr-x | memcached.sysvel4 | 9 |
2 files changed, 12 insertions, 7 deletions
diff --git a/memcached.spec b/memcached.spec index d961289..3a460c2 100644 --- a/memcached.spec +++ b/memcached.spec @@ -3,7 +3,7 @@ Name: memcached Version: 1.4.5 -Release: 2%{?dist} +Release: 2%{?dist}.1 Epoch: 0 Summary: High Performance, Distributed Memory Object Cache @@ -78,10 +78,10 @@ install -Dp -m0755 scripts/memcached-tool %{buildroot}%{_bindir}/memcached-tool install -Dp -m0755 %{SOURCE2} %{buildroot}%{_initrddir}/memcached %else install -Dp -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/memcached +%endif # pid directory mkdir -p %{buildroot}/%{_localstatedir}/run/memcached -%endif # Default configs mkdir -p %{buildroot}/%{_sysconfdir}/sysconfig @@ -131,10 +131,7 @@ exit 0 %defattr(-,root,root,-) %doc AUTHORS ChangeLog COPYING NEWS README doc/CONTRIBUTORS doc/*.txt %config(noreplace) %{_sysconfdir}/sysconfig/%{name} - -%if %{?rhel}%{?fedora} > 4 %dir %attr(755,%{username},%{groupname}) %{_localstatedir}/run/memcached -%endif %{_bindir}/memcached-tool %{_bindir}/memcached %{_mandir}/man1/memcached.1* @@ -145,6 +142,9 @@ exit 0 %{_includedir}/memcached/* %changelog +* Tue Jun 15 2010 Remi Collet <rpms@famillecollet.com> - 1.4.5-2.el4.1 +- also use /var/run/memcached/memcached.pid on EL-4 + * Sun Jun 13 2010 Remi Collet <rpms@famillecollet.com> - 1.4.5-2 - sync with rawhide rebuild for remi repository EL-5.5 : rebuild against latest libevent 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 |