[arch-commits] Commit in memcached/repos (16 files)

Dan McGee dan at archlinux.org
Tue Jul 31 00:50:49 UTC 2012


    Date: Monday, July 30, 2012 @ 20:50:49
  Author: dan
Revision: 164340

archrelease: copy trunk to extra-i686, extra-x86_64

Added:
  memcached/repos/extra-i686/ChangeLog
    (from rev 164339, memcached/trunk/ChangeLog)
  memcached/repos/extra-i686/PKGBUILD
    (from rev 164339, memcached/trunk/PKGBUILD)
  memcached/repos/extra-i686/memcached.conf
    (from rev 164339, memcached/trunk/memcached.conf)
  memcached/repos/extra-i686/memcached.sh
    (from rev 164339, memcached/trunk/memcached.sh)
  memcached/repos/extra-x86_64/ChangeLog
    (from rev 164339, memcached/trunk/ChangeLog)
  memcached/repos/extra-x86_64/PKGBUILD
    (from rev 164339, memcached/trunk/PKGBUILD)
  memcached/repos/extra-x86_64/memcached.conf
    (from rev 164339, memcached/trunk/memcached.conf)
  memcached/repos/extra-x86_64/memcached.sh
    (from rev 164339, memcached/trunk/memcached.sh)
Deleted:
  memcached/repos/extra-i686/ChangeLog
  memcached/repos/extra-i686/PKGBUILD
  memcached/repos/extra-i686/memcached.conf
  memcached/repos/extra-i686/memcached.sh
  memcached/repos/extra-x86_64/ChangeLog
  memcached/repos/extra-x86_64/PKGBUILD
  memcached/repos/extra-x86_64/memcached.conf
  memcached/repos/extra-x86_64/memcached.sh

-----------------------------+
 extra-i686/ChangeLog        |   48 ++++++++--------
 extra-i686/PKGBUILD         |   76 ++++++++++++-------------
 extra-i686/memcached.conf   |    8 +-
 extra-i686/memcached.sh     |  126 +++++++++++++++++++++---------------------
 extra-x86_64/ChangeLog      |   48 ++++++++--------
 extra-x86_64/PKGBUILD       |   76 ++++++++++++-------------
 extra-x86_64/memcached.conf |    8 +-
 extra-x86_64/memcached.sh   |  126 +++++++++++++++++++++---------------------
 8 files changed, 258 insertions(+), 258 deletions(-)

Deleted: extra-i686/ChangeLog
===================================================================
--- extra-i686/ChangeLog	2012-07-31 00:50:08 UTC (rev 164339)
+++ extra-i686/ChangeLog	2012-07-31 00:50:49 UTC (rev 164340)
@@ -1,24 +0,0 @@
-2011-02-07 Ionut Biru <ibiru at archlinux.org>
-	* Rebuild 1.4.5 against libevent 2.0.10
-
-2011-01-31 Dan McGee <dan at archlinux.org>
-	* Rebuild 1.4.5 with gcc 4.5.X patch accepted upstream
-
-2009-11-14 Dan McGee <dan at archlinux.org>
-	* Bump to 1.4.3
-	* Added memcached-tool to package
-
-2009-09-13 Dan McGee <dan at archlinux.org>
-	* Bump to 1.4.1
-	* Add new required conf.d option MEMCACHED_USER
-	* Rework the way we store the PID for init script usage
-
-2009-04-12 Dan McGee <dan at archlinux.org>
-	* Bump to 1.2.8
-
-2009-04-05 Dan McGee <dan at archlinux.org>
-	* Bump to 1.2.7
-
-2008-12-13 Dan McGee <dan at archlinux.org>
-	* Added conf file to backup array
-	* Fixed the not quite right default config

Copied: memcached/repos/extra-i686/ChangeLog (from rev 164339, memcached/trunk/ChangeLog)
===================================================================
--- extra-i686/ChangeLog	                        (rev 0)
+++ extra-i686/ChangeLog	2012-07-31 00:50:49 UTC (rev 164340)
@@ -0,0 +1,24 @@
+2011-02-07 Ionut Biru <ibiru at archlinux.org>
+	* Rebuild 1.4.5 against libevent 2.0.10
+
+2011-01-31 Dan McGee <dan at archlinux.org>
+	* Rebuild 1.4.5 with gcc 4.5.X patch accepted upstream
+
+2009-11-14 Dan McGee <dan at archlinux.org>
+	* Bump to 1.4.3
+	* Added memcached-tool to package
+
+2009-09-13 Dan McGee <dan at archlinux.org>
+	* Bump to 1.4.1
+	* Add new required conf.d option MEMCACHED_USER
+	* Rework the way we store the PID for init script usage
+
+2009-04-12 Dan McGee <dan at archlinux.org>
+	* Bump to 1.2.8
+
+2009-04-05 Dan McGee <dan at archlinux.org>
+	* Bump to 1.2.7
+
+2008-12-13 Dan McGee <dan at archlinux.org>
+	* Added conf file to backup array
+	* Fixed the not quite right default config

Deleted: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD	2012-07-31 00:50:08 UTC (rev 164339)
+++ extra-i686/PKGBUILD	2012-07-31 00:50:49 UTC (rev 164340)
@@ -1,38 +0,0 @@
-# $Id$
-# Maintainer: Dan McGee <dan at archlinux.org>
-# Contributor: Michael Irwin <6d6469 at gmail.com>
-
-pkgname=memcached
-pkgver=1.4.13
-pkgrel=1
-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')
-source=(http://memcached.googlecode.com/files/$pkgname-$pkgver.tar.gz
-        memcached.conf
-		memcached.sh)
-changelog=ChangeLog
-sha256sums=('cb0b8b87aa57890d2327906a11f2f1b61b8d870c0885b54c61ca46f954f27e29'
-            '0e57a0f528b387f1f04f628ec74856c615d82d44f4d6bc041c33b3814ce13d0a'
-            '72efa639c5a39c7c14f07cc51731ebbf82299870d9cf31cf3aaa981bc084b4eb')
-
-build() {
-  cd "$srcdir/$pkgname-$pkgver"
-  ./configure --prefix=/usr
-  make
-}
-
-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
-}

Copied: memcached/repos/extra-i686/PKGBUILD (from rev 164339, memcached/trunk/PKGBUILD)
===================================================================
--- extra-i686/PKGBUILD	                        (rev 0)
+++ extra-i686/PKGBUILD	2012-07-31 00:50:49 UTC (rev 164340)
@@ -0,0 +1,38 @@
+# $Id$
+# Maintainer: Dan McGee <dan at archlinux.org>
+# Contributor: Michael Irwin <6d6469 at gmail.com>
+
+pkgname=memcached
+pkgver=1.4.14
+pkgrel=1
+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')
+source=(http://memcached.googlecode.com/files/$pkgname-$pkgver.tar.gz
+        memcached.conf
+		memcached.sh)
+changelog=ChangeLog
+sha256sums=('f2e2ad8ee8d256f2c3748d7f741dcddfd0ab6bdece6fa1c18484e83f311156ef'
+            '0e57a0f528b387f1f04f628ec74856c615d82d44f4d6bc041c33b3814ce13d0a'
+            '72efa639c5a39c7c14f07cc51731ebbf82299870d9cf31cf3aaa981bc084b4eb')
+
+build() {
+  cd "$srcdir/$pkgname-$pkgver"
+  ./configure --prefix=/usr
+  make
+}
+
+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
+}

Deleted: extra-i686/memcached.conf
===================================================================
--- extra-i686/memcached.conf	2012-07-31 00:50:08 UTC (rev 164339)
+++ extra-i686/memcached.conf	2012-07-31 00:50:49 UTC (rev 164340)
@@ -1,4 +0,0 @@
-# user to run memcached as; also used for pid file ownership
-MEMCACHED_USER="nobody"
-# see 'memcached -h' for available options
-MEMCACHED_ARGS="-l 127.0.0.1 -t 1"

Copied: memcached/repos/extra-i686/memcached.conf (from rev 164339, memcached/trunk/memcached.conf)
===================================================================
--- extra-i686/memcached.conf	                        (rev 0)
+++ extra-i686/memcached.conf	2012-07-31 00:50:49 UTC (rev 164340)
@@ -0,0 +1,4 @@
+# user to run memcached as; also used for pid file ownership
+MEMCACHED_USER="nobody"
+# see 'memcached -h' for available options
+MEMCACHED_ARGS="-l 127.0.0.1 -t 1"

Deleted: extra-i686/memcached.sh
===================================================================
--- extra-i686/memcached.sh	2012-07-31 00:50:08 UTC (rev 164339)
+++ extra-i686/memcached.sh	2012-07-31 00:50:49 UTC (rev 164340)
@@ -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

Copied: memcached/repos/extra-i686/memcached.sh (from rev 164339, memcached/trunk/memcached.sh)
===================================================================
--- extra-i686/memcached.sh	                        (rev 0)
+++ extra-i686/memcached.sh	2012-07-31 00:50:49 UTC (rev 164340)
@@ -0,0 +1,63 @@
+#!/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

Deleted: extra-x86_64/ChangeLog
===================================================================
--- extra-x86_64/ChangeLog	2012-07-31 00:50:08 UTC (rev 164339)
+++ extra-x86_64/ChangeLog	2012-07-31 00:50:49 UTC (rev 164340)
@@ -1,24 +0,0 @@
-2011-02-07 Ionut Biru <ibiru at archlinux.org>
-	* Rebuild 1.4.5 against libevent 2.0.10
-
-2011-01-31 Dan McGee <dan at archlinux.org>
-	* Rebuild 1.4.5 with gcc 4.5.X patch accepted upstream
-
-2009-11-14 Dan McGee <dan at archlinux.org>
-	* Bump to 1.4.3
-	* Added memcached-tool to package
-
-2009-09-13 Dan McGee <dan at archlinux.org>
-	* Bump to 1.4.1
-	* Add new required conf.d option MEMCACHED_USER
-	* Rework the way we store the PID for init script usage
-
-2009-04-12 Dan McGee <dan at archlinux.org>
-	* Bump to 1.2.8
-
-2009-04-05 Dan McGee <dan at archlinux.org>
-	* Bump to 1.2.7
-
-2008-12-13 Dan McGee <dan at archlinux.org>
-	* Added conf file to backup array
-	* Fixed the not quite right default config

Copied: memcached/repos/extra-x86_64/ChangeLog (from rev 164339, memcached/trunk/ChangeLog)
===================================================================
--- extra-x86_64/ChangeLog	                        (rev 0)
+++ extra-x86_64/ChangeLog	2012-07-31 00:50:49 UTC (rev 164340)
@@ -0,0 +1,24 @@
+2011-02-07 Ionut Biru <ibiru at archlinux.org>
+	* Rebuild 1.4.5 against libevent 2.0.10
+
+2011-01-31 Dan McGee <dan at archlinux.org>
+	* Rebuild 1.4.5 with gcc 4.5.X patch accepted upstream
+
+2009-11-14 Dan McGee <dan at archlinux.org>
+	* Bump to 1.4.3
+	* Added memcached-tool to package
+
+2009-09-13 Dan McGee <dan at archlinux.org>
+	* Bump to 1.4.1
+	* Add new required conf.d option MEMCACHED_USER
+	* Rework the way we store the PID for init script usage
+
+2009-04-12 Dan McGee <dan at archlinux.org>
+	* Bump to 1.2.8
+
+2009-04-05 Dan McGee <dan at archlinux.org>
+	* Bump to 1.2.7
+
+2008-12-13 Dan McGee <dan at archlinux.org>
+	* Added conf file to backup array
+	* Fixed the not quite right default config

Deleted: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD	2012-07-31 00:50:08 UTC (rev 164339)
+++ extra-x86_64/PKGBUILD	2012-07-31 00:50:49 UTC (rev 164340)
@@ -1,38 +0,0 @@
-# $Id$
-# Maintainer: Dan McGee <dan at archlinux.org>
-# Contributor: Michael Irwin <6d6469 at gmail.com>
-
-pkgname=memcached
-pkgver=1.4.13
-pkgrel=1
-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')
-source=(http://memcached.googlecode.com/files/$pkgname-$pkgver.tar.gz
-        memcached.conf
-		memcached.sh)
-changelog=ChangeLog
-sha256sums=('cb0b8b87aa57890d2327906a11f2f1b61b8d870c0885b54c61ca46f954f27e29'
-            '0e57a0f528b387f1f04f628ec74856c615d82d44f4d6bc041c33b3814ce13d0a'
-            '72efa639c5a39c7c14f07cc51731ebbf82299870d9cf31cf3aaa981bc084b4eb')
-
-build() {
-  cd "$srcdir/$pkgname-$pkgver"
-  ./configure --prefix=/usr
-  make
-}
-
-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
-}

Copied: memcached/repos/extra-x86_64/PKGBUILD (from rev 164339, memcached/trunk/PKGBUILD)
===================================================================
--- extra-x86_64/PKGBUILD	                        (rev 0)
+++ extra-x86_64/PKGBUILD	2012-07-31 00:50:49 UTC (rev 164340)
@@ -0,0 +1,38 @@
+# $Id$
+# Maintainer: Dan McGee <dan at archlinux.org>
+# Contributor: Michael Irwin <6d6469 at gmail.com>
+
+pkgname=memcached
+pkgver=1.4.14
+pkgrel=1
+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')
+source=(http://memcached.googlecode.com/files/$pkgname-$pkgver.tar.gz
+        memcached.conf
+		memcached.sh)
+changelog=ChangeLog
+sha256sums=('f2e2ad8ee8d256f2c3748d7f741dcddfd0ab6bdece6fa1c18484e83f311156ef'
+            '0e57a0f528b387f1f04f628ec74856c615d82d44f4d6bc041c33b3814ce13d0a'
+            '72efa639c5a39c7c14f07cc51731ebbf82299870d9cf31cf3aaa981bc084b4eb')
+
+build() {
+  cd "$srcdir/$pkgname-$pkgver"
+  ./configure --prefix=/usr
+  make
+}
+
+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
+}

Deleted: extra-x86_64/memcached.conf
===================================================================
--- extra-x86_64/memcached.conf	2012-07-31 00:50:08 UTC (rev 164339)
+++ extra-x86_64/memcached.conf	2012-07-31 00:50:49 UTC (rev 164340)
@@ -1,4 +0,0 @@
-# user to run memcached as; also used for pid file ownership
-MEMCACHED_USER="nobody"
-# see 'memcached -h' for available options
-MEMCACHED_ARGS="-l 127.0.0.1 -t 1"

Copied: memcached/repos/extra-x86_64/memcached.conf (from rev 164339, memcached/trunk/memcached.conf)
===================================================================
--- extra-x86_64/memcached.conf	                        (rev 0)
+++ extra-x86_64/memcached.conf	2012-07-31 00:50:49 UTC (rev 164340)
@@ -0,0 +1,4 @@
+# user to run memcached as; also used for pid file ownership
+MEMCACHED_USER="nobody"
+# see 'memcached -h' for available options
+MEMCACHED_ARGS="-l 127.0.0.1 -t 1"

Deleted: extra-x86_64/memcached.sh
===================================================================
--- extra-x86_64/memcached.sh	2012-07-31 00:50:08 UTC (rev 164339)
+++ extra-x86_64/memcached.sh	2012-07-31 00:50:49 UTC (rev 164340)
@@ -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

Copied: memcached/repos/extra-x86_64/memcached.sh (from rev 164339, memcached/trunk/memcached.sh)
===================================================================
--- extra-x86_64/memcached.sh	                        (rev 0)
+++ extra-x86_64/memcached.sh	2012-07-31 00:50:49 UTC (rev 164340)
@@ -0,0 +1,63 @@
+#!/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




More information about the arch-commits mailing list