summaryrefslogtreecommitdiff
path: root/redis
diff options
context:
space:
mode:
authorThomas Penteker <tek@serverop.de>2017-07-26 23:46:17 +0200
committerThomas Penteker <tek@serverop.de>2017-07-26 23:46:17 +0200
commit6781d0477691f857afcf008096f08c0717f928b2 (patch)
tree06e5e0dc77b5ee512ae9dd1abf00638a1650fb01 /redis
parenta8ab1aff518e0016433ccb9fea58659edbb1ef75 (diff)
downloadcontrib-6781d0477691f857afcf008096f08c0717f928b2.tar.gz
contrib-6781d0477691f857afcf008096f08c0717f928b2.tar.xz
redis: fix PID file creation
Diffstat (limited to 'redis')
-rw-r--r--redis/.md5sum6
-rw-r--r--redis/.signature10
-rw-r--r--redis/Pkgfile2
-rw-r--r--redis/redis.conf2
-rwxr-xr-x[-rw-r--r--]redis/redis.rc63
5 files changed, 37 insertions, 46 deletions
diff --git a/redis/.md5sum b/redis/.md5sum
index ce22a9d99..b8821906a 100644
--- a/redis/.md5sum
+++ b/redis/.md5sum
@@ -1,3 +1,3 @@
-c91867a18ae0c5f7bb61a7c1120d80b4 redis-3.2.8.tar.gz
-49d183a3b4cb0d9c939bf09102408ff1 redis.conf
-e513f048a3f9f3e8a6c9b69c990b3d3c redis.rc
+f220ea7468eb87986435d69e9ce080c6 redis-4.0.0.tar.gz
+6b7e6b1fe58ec65b1deb15654fb878d3 redis.conf
+28cb4b04d228f88687f3ea85ab0a3c04 redis.rc
diff --git a/redis/.signature b/redis/.signature
index f2047f305..89a2bb899 100644
--- a/redis/.signature
+++ b/redis/.signature
@@ -1,7 +1,7 @@
untrusted comment: verify with /etc/ports/contrib.pub
-RWSagIOpLGJF3zlWfs3PDkyoZiojCLVH51jodPX/2oJh6HOlgO6hj2tsh1fDQjf1eIwCiKMmsbG+ddvlaxwpA2+MFtR+XccyrAE=
-SHA256 (Pkgfile) = e243fb12221cd3474e2f314c581f1cbfc9b36b29b0a05ff505544dc271398687
+RWSagIOpLGJF34o+h5vQMJ6dlQDJjS7MwkJl/n96SiWIBzRpx3/1o4DV2QVVMkkBJgyIWEKzx8HMJREJwZVrF/EG2k6tF/62yA0=
+SHA256 (Pkgfile) = c341baae4d2fce9407a2dcb42bfdb2ca3d0a92af58c2f0daf88e4b59998f78d3
SHA256 (.footprint) = 4387ee19c2f532aa7fe636611e08ecbabbfbfc7f4208ae848786c61493bc81e9
-SHA256 (redis-3.2.8.tar.gz) = 61b373c23d18e6cc752a69d5ab7f676c6216dc2853e46750a8c4ed791d68482c
-SHA256 (redis.conf) = d253642f2bfecb67dae28c8361bddef4029f9c42ce6b1695be0bef137b5d86b5
-SHA256 (redis.rc) = b86a63392fc62190992174fb3bccc243095b35359224b59fcb6ef1bf08595c1f
+SHA256 (redis-4.0.0.tar.gz) = d539ae309295721d5c3ed7298939645b6f86ab5d25fdf2a0352ab575c159df2d
+SHA256 (redis.conf) = a6562d620f24f680089a27632ae49f4c69ccb3e0232bd65c7da1ec0ecd8f30f9
+SHA256 (redis.rc) = 364257ea85d9e71196bdc1621da26b07684366c7030fbdea60b72a603e854a4f
diff --git a/redis/Pkgfile b/redis/Pkgfile
index 97c4a8a5d..56b702f9d 100644
--- a/redis/Pkgfile
+++ b/redis/Pkgfile
@@ -4,7 +4,7 @@
# Packager: James Mills, prologic at shortcircuit dot net dot au
name=redis
-version=3.2.8
+version=4.0.0
release=1
source=(
http://download.redis.io/releases/$name-$version.tar.gz
diff --git a/redis/redis.conf b/redis/redis.conf
index def479eaa..aae4f1c98 100644
--- a/redis/redis.conf
+++ b/redis/redis.conf
@@ -244,7 +244,7 @@ dbfilename dump.rdb
# The Append Only File will also be created inside this directory.
#
# Note that you must specify a directory here, not a file name.
-dir ./
+dir /var/lib/redis
################################# REPLICATION #################################
diff --git a/redis/redis.rc b/redis/redis.rc
index 1e4d0d77c..006ce0d05 100644..100755
--- a/redis/redis.rc
+++ b/redis/redis.rc
@@ -1,49 +1,40 @@
#!/bin/sh
#
-# /etc/rc.d/redis: start/stop Redis daemon
+# /etc/rc.d/redis: start/stop redis server
#
+# make sure to have set daemonize to no in redis.conf so that PID file
+# creation and tracking by start-stop-daemon work properly
-REDISPORT=6379
-EXEC=/usr/bin/redis-server
-CLIEXEC=/usr/bin/redis-cli
-
-PIDFILE=/var/run/redis.pid
-CONF="/etc/redis.conf"
+SSD=/sbin/start-stop-daemon
+PROG=/usr/bin/redis-server
+PID=/var/run/redis.pid
+USR=redis
+RDBDIR=/var/lib/redis
case $1 in
start)
- if [ -f $PIDFILE ]
- then
- echo "$PIDFILE exists, process is already running or crashed"
- else
- echo "Starting Redis server..."
- $EXEC $CONF
- fi
- ;;
+ $SSD --start -c $USR -b -m --pidfile $PID --exec $PROG -- /etc/redis.conf
+ ;;
stop)
- if [ ! -f $PIDFILE ]
- then
- echo "$PIDFILE does not exist, process is not running"
- else
- PID=$(cat $PIDFILE)
- echo "Stopping ..."
- $CLIEXEC -p $REDISPORT shutdown
- while [ -x /proc/${PID} ]
- do
- echo "Waiting for Redis to shutdown..."
- sleep 1
- done
- echo "Redis stopped"
- fi
- ;;
+ $SSD --stop --retry 10 --pidfile $PID --remove-pidfile
+ ;;
restart)
- $0 stop
- sleep 2
- $0 start
- ;;
+ $0 stop
+ $0 start
+ ;;
+status)
+ $SSD --status --pidfile $PID
+ case $? in
+ 0) echo "$PROG is running with pid $(cat $PID)" ;;
+ 1) echo "$PROG is not running but the pid file $PID exists" ;;
+ 3) echo "$PROG is not running" ;;
+ 4) echo "Unable to determine the program status" ;;
+ esac
+ ;;
*)
- echo "usage: $0 [start|stop|restart]"
- ;;
+ echo "usage: $0 [start|stop|restart|status]"
+ ;;
esac
# End of file
+

Generated by cgit