Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=b21ddbd8b2a079d956b232cbf45769a24a8178cb

commit b21ddbd8b2a079d956b232cbf45769a24a8178cb
Author: CSÉCSY László <boo...@frugalware.org>
Date:   Wed Jan 14 22:31:39 2009 +0100

memcached-1.2.6-2-i686
add support for service status

diff --git a/source/network-extra/memcached/FrugalBuild 
b/source/network-extra/memcached/FrugalBuild
index 9888240..85e85c1 100644
--- a/source/network-extra/memcached/FrugalBuild
+++ b/source/network-extra/memcached/FrugalBuild
@@ -3,7 +3,7 @@

pkgname=memcached
pkgver=1.2.6
-pkgrel=1
+pkgrel=2
pkgdesc="A high-performance, distributed memory object caching system."
url="http://www.danga.com/memcached/";
depends=('libevent')
@@ -14,7 +14,7 @@ source=(${url}dist/$pkgname-$pkgver.tar.gz memcached 
rc.memcached)
backup=(etc/sysconfig/memcached)
sha1sums=('675a2576efac3d1333181e33fdd43f45f1f5d3fa' \
'a870f1229b48f0de9ce73143d34d7be89f405a62' \
-         '0210b69943c26df849f6dfda427ecd90750bf639')
+         '38e9794f2f9addc5b25d118b1d370f663c4b9f95')

build() {
Fbuild
diff --git a/source/network-extra/memcached/rc.memcached 
b/source/network-extra/memcached/rc.memcached
index b0935f7..ea87143 100644
--- a/source/network-extra/memcached/rc.memcached
+++ b/source/network-extra/memcached/rc.memcached
@@ -20,11 +20,12 @@ actions=(restart start status stop)
daemon=$"memcached"

pidfile="/var/run/memcached.pid"
+pid="cat $pidfile 2> /dev/null"

rc_start()
{
start_msg
-       if [[ ! -f $pidfile && -z $(pidof memcached 2> /dev/null) ]]; then
+       if [ -z "$(eval $pid)" ]; then
/usr/bin/memcached -d -p $PORT -u $USER -c $MAXCONN -m $CACHESIZE $OPTIONS
pidof memcached >$pidfile 2>/dev/null
ok $?
@@ -36,7 +37,7 @@ rc_start()
rc_stop()
{
stop_msg
-       if [ -f $pidfile ]; then
+       if [ -n "$(eval $pid)" ]; then
kill "$(cat $pidfile)"
rm -f $pidfile
ok $?
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to