summaryrefslogtreecommitdiff
path: root/extra/memcached
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-05-13 01:16:28 -0700
committerroot <root@rshg054.dnsready.net>2013-05-13 01:16:28 -0700
commit66cb4a487ad73063c6b000279a5d5558fb7603f5 (patch)
treeee73bbc414ba8aec6b9a578578ceaabd38fff01e /extra/memcached
parent5b9e0d821dd428792bd51ed03af2b800924ce69d (diff)
Mon May 13 01:16:27 PDT 2013
Diffstat (limited to 'extra/memcached')
-rw-r--r--extra/memcached/PKGBUILD11
-rw-r--r--extra/memcached/memcached.sh63
2 files changed, 2 insertions, 72 deletions
diff --git a/extra/memcached/PKGBUILD b/extra/memcached/PKGBUILD
index ddd34a2c9..2de510c5d 100644
--- a/extra/memcached/PKGBUILD
+++ b/extra/memcached/PKGBUILD
@@ -1,25 +1,20 @@
-# $Id: PKGBUILD 166159 2012-09-04 23:45:23Z dan $
+# $Id: PKGBUILD 185263 2013-05-12 16:29:01Z dan $
# Maintainer: Dan McGee <dan@archlinux.org>
# Contributor: Michael Irwin <6d6469@gmail.com>
pkgname=memcached
pkgver=1.4.15
-pkgrel=1
+pkgrel=2
pkgdesc="A distributed memory object caching system"
arch=(i686 x86_64)
url="http://memcached.org/"
license=('GPL')
depends=('libevent')
optdepends=('perl: for memcached-tool usage')
-backup=('etc/conf.d/memcached')
install=memcached.install
source=(http://memcached.googlecode.com/files/$pkgname-$pkgver.tar.gz
- memcached.conf
- memcached.sh
memcached.service)
sha256sums=('169721ab7a7531add6ae9f6b14b6b5641725fe0b1f0bdf5c3a4327725901e2b4'
- '17f66873b77e96c6706dcf13ab0aa8ddff94b2851366c787fc23e614dfc11f47'
- '72efa639c5a39c7c14f07cc51731ebbf82299870d9cf31cf3aaa981bc084b4eb'
'453cad82bddb25fac43fd5cedc5702b9b6c6abaf7498e21445facf20f25f53a6')
build() {
@@ -32,7 +27,5 @@ package() {
cd "$srcdir/$pkgname-$pkgver"
make DESTDIR="$pkgdir" install
install -D -m 755 scripts/memcached-tool "$pkgdir"/usr/bin/memcached-tool
- install -D -m 644 ../memcached.conf "$pkgdir"/etc/conf.d/memcached
- install -D -m 755 ../memcached.sh "$pkgdir"/etc/rc.d/memcached
install -D -m 644 ../memcached.service "$pkgdir"/usr/lib/systemd/system/memcached.service
}
diff --git a/extra/memcached/memcached.sh b/extra/memcached/memcached.sh
deleted file mode 100644
index 9c9727507..000000000
--- a/extra/memcached/memcached.sh
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-. /etc/conf.d/memcached
-
-PIDFILE='/var/run/memcached.pid'
-
-getpid() {
- local pid
- pid=$(cat $PIDFILE 2>/dev/null)
- # if the process is no longer valid, don't return it
- if [ -n "$pid" ]; then
- if ! ps -p $pid >/dev/null; then
- rm -f $PIDFILE
- pid=""
- fi
- fi
- echo $pid
-}
-
-PID="$(getpid)"
-
-case "$1" in
- start)
- stat_busy "Starting memcached"
- # memcached is retarded and doesn't write to the pidfile
- # before it drops permissions
- if [ -n "$PID" ]; then
- stat_fail
- elif [ -z "$MEMCACHED_USER" ]; then
- echo "MEMCACHED_USER must be defined in /etc/conf.d/memcached"
- stat_fail
- else
- touch $PIDFILE && chown $MEMCACHED_USER $PIDFILE
- /usr/bin/memcached -d -P $PIDFILE -u $MEMCACHED_USER $MEMCACHED_ARGS
- if [ $? -gt 0 ]; then
- stat_fail
- else
- add_daemon memcached
- stat_done
- fi
- fi
- ;;
- stop)
- stat_busy "Stopping memcached"
- [ ! -z "$PID" ] && kill $PID &> /dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- rm -f $PIDFILE
- rm_daemon memcached
- stat_done
- fi
- ;;
- restart)
- $0 stop
- sleep 1
- $0 start
- ;;
- *)
- echo "usage: $0 {start|stop|restart}"
-esac