summaryrefslogtreecommitdiff
path: root/community/redis
diff options
context:
space:
mode:
Diffstat (limited to 'community/redis')
-rw-r--r--community/redis/PKGBUILD6
-rw-r--r--community/redis/redis.d7
2 files changed, 9 insertions, 4 deletions
diff --git a/community/redis/PKGBUILD b/community/redis/PKGBUILD
index 94b5a2db1..a46b4422d 100644
--- a/community/redis/PKGBUILD
+++ b/community/redis/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 69786 2012-04-23 09:37:03Z spupykin $
+# $Id: PKGBUILD 70007 2012-04-28 09:18:17Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Jan-Erik Rediger <badboy at archlinux dot us>
# Contributor: nofxx <x@<nick>.com>
pkgname=redis
pkgver=2.4.11
-pkgrel=1
+pkgrel=2
pkgdesc="Advanced key-value store"
arch=('i686' 'x86_64')
url="http://redis.io/"
@@ -19,7 +19,7 @@ source=("http://redis.googlecode.com/files/${pkgname}-${pkgver}.tar.gz"
"redis.d"
"redis.logrotate")
md5sums=('ccd193d80196855343840db6110bf58d'
- 'f8fb4b00ee3636c7dc7c173e2f6a4e76'
+ '9d58bcc2bc0e193353206c608e71f5d6'
'9e2d75b7a9dc421122d673fe520ef17f')
build() {
diff --git a/community/redis/redis.d b/community/redis/redis.d
index afd001fd5..4babbaaa5 100644
--- a/community/redis/redis.d
+++ b/community/redis/redis.d
@@ -12,9 +12,14 @@ PIDFILE=/var/run/redis.pid
WORKDIR=/var/lib/redis
CONF="/etc/redis.conf"
-PID=$(cat $PIDFILE)
+# Check if process exists
+PID=$(cat $PIDFILE 2>/dev/null)
[ -d /proc/${PID} ] || rm -f $PIDFILE
+# Grab the server password, if exists
+REDISPASS=`egrep -o '^requirepass ([^#]+)' $CONF | cut -d\ -f 2`
+[ -n "$REDISPASS" ] && CLIEXEC="$CLIEXEC -a $REDISPASS"
+
case "$1" in
start)
stat_busy "Starting $daemon_name"