diff options
author | root <root@rshg054.dnsready.net> | 2012-09-06 00:03:30 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-09-06 00:03:30 +0000 |
commit | af549d0243764531309fa94b1f5cee58982c496a (patch) | |
tree | afb2851caf91700e83c4062a9e77c6a92fe0326b /extra/memcached | |
parent | 58f5e0b164b5f4c9af61b2e42bd10c85f28b9bed (diff) |
Thu Sep 6 00:03:29 UTC 2012
Diffstat (limited to 'extra/memcached')
-rw-r--r-- | extra/memcached/PKGBUILD | 24 | ||||
-rw-r--r-- | extra/memcached/memcached.conf | 2 | ||||
-rw-r--r-- | extra/memcached/memcached.install | 21 | ||||
-rw-r--r-- | extra/memcached/memcached.service | 11 |
4 files changed, 45 insertions, 13 deletions
diff --git a/extra/memcached/PKGBUILD b/extra/memcached/PKGBUILD index a43032011..ddd34a2c9 100644 --- a/extra/memcached/PKGBUILD +++ b/extra/memcached/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 164340 2012-07-31 00:50:49Z dan $ +# $Id: PKGBUILD 166159 2012-09-04 23:45:23Z dan $ # Maintainer: Dan McGee <dan@archlinux.org> # Contributor: Michael Irwin <6d6469@gmail.com> pkgname=memcached -pkgver=1.4.14 +pkgver=1.4.15 pkgrel=1 pkgdesc="A distributed memory object caching system" arch=(i686 x86_64) @@ -12,13 +12,15 @@ 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) -changelog=ChangeLog -sha256sums=('f2e2ad8ee8d256f2c3748d7f741dcddfd0ab6bdece6fa1c18484e83f311156ef' - '0e57a0f528b387f1f04f628ec74856c615d82d44f4d6bc041c33b3814ce13d0a' - '72efa639c5a39c7c14f07cc51731ebbf82299870d9cf31cf3aaa981bc084b4eb') + memcached.sh + memcached.service) +sha256sums=('169721ab7a7531add6ae9f6b14b6b5641725fe0b1f0bdf5c3a4327725901e2b4' + '17f66873b77e96c6706dcf13ab0aa8ddff94b2851366c787fc23e614dfc11f47' + '72efa639c5a39c7c14f07cc51731ebbf82299870d9cf31cf3aaa981bc084b4eb' + '453cad82bddb25fac43fd5cedc5702b9b6c6abaf7498e21445facf20f25f53a6') build() { cd "$srcdir/$pkgname-$pkgver" @@ -30,9 +32,7 @@ package() { cd "$srcdir/$pkgname-$pkgver" make DESTDIR="$pkgdir" install install -D -m 755 scripts/memcached-tool "$pkgdir"/usr/bin/memcached-tool - # This POS is entirely RedHat specific, so not including it now - #install -D -m 755 scripts/memcached.service "$pkgdir"/lib/systemd/system/memcached.service - #sed -i -e 's#^EnvironmentFile.*#EnvironmentFile=/etc/conf.d/memcached#' "$pkgdir"/lib/systemd/system/memcached.service - install -D -m 644 "$srcdir/memcached.conf" "$pkgdir"/etc/conf.d/memcached - install -D -m 755 "$srcdir/memcached.sh" "$pkgdir"/etc/rc.d/memcached + 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.conf b/extra/memcached/memcached.conf index bf120b059..4415e1a55 100644 --- a/extra/memcached/memcached.conf +++ b/extra/memcached/memcached.conf @@ -1,4 +1,4 @@ # user to run memcached as; also used for pid file ownership -MEMCACHED_USER="nobody" +MEMCACHED_USER="memcached" # see 'memcached -h' for available options MEMCACHED_ARGS="-l 127.0.0.1 -t 1" diff --git a/extra/memcached/memcached.install b/extra/memcached/memcached.install new file mode 100644 index 000000000..d6dca8d23 --- /dev/null +++ b/extra/memcached/memcached.install @@ -0,0 +1,21 @@ +post_install() { + if ! getent group memcached >/dev/null; then + groupadd --system memcached + fi + if ! getent passwd memcached >/dev/null; then + useradd --system -c 'memcached user' -g memcached -d / -s /bin/bash memcached + fi +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + if getent passwd memcached >/dev/null; then + userdel memcached + fi + if getent group memcached >/dev/null; then + groupdel memcached + fi +} diff --git a/extra/memcached/memcached.service b/extra/memcached/memcached.service new file mode 100644 index 000000000..c6e15fb7c --- /dev/null +++ b/extra/memcached/memcached.service @@ -0,0 +1,11 @@ +[Unit] +Description=Memcached Daemon +After=network.target + +[Service] +User=memcached +# Remove '-l 127.0.0.1' to listen on all addresses +ExecStart=/usr/bin/memcached -l 127.0.0.1 + +[Install] +WantedBy=multi-user.target |