forked from pool/redis
- Updated to 2.4.1.
- Fixed init script. OBS-URL: https://build.opensuse.org/package/show/server:database/redis?expand=0&rev=23
This commit is contained in:
parent
a327cce110
commit
2ca538637f
@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
Index: redis.conf
|
Index: redis.conf
|
||||||
===================================================================
|
===================================================================
|
||||||
--- redis.conf.orig
|
--- redis.conf.orig 2011-10-17 10:46:00.000000000 +0200
|
||||||
+++ redis.conf
|
+++ redis.conf 2011-10-24 12:47:49.839930573 +0200
|
||||||
@@ -14,7 +14,7 @@
|
@@ -14,7 +14,7 @@
|
||||||
|
|
||||||
# By default Redis does not run as a daemon. Use 'yes' if you need it.
|
# By default Redis does not run as a daemon. Use 'yes' if you need it.
|
||||||
@ -24,7 +24,7 @@ Index: redis.conf
|
|||||||
|
|
||||||
# Specify the path for the unix socket that will be used to listen for
|
# Specify the path for the unix socket that will be used to listen for
|
||||||
# incoming connections. There is no default, so Redis will not listen
|
# incoming connections. There is no default, so Redis will not listen
|
||||||
@@ -44,12 +44,12 @@ timeout 300
|
@@ -45,12 +45,12 @@ timeout 300
|
||||||
# verbose (many rarely useful info, but not a mess like the debug level)
|
# verbose (many rarely useful info, but not a mess like the debug level)
|
||||||
# notice (moderately verbose, what you want in production probably)
|
# notice (moderately verbose, what you want in production probably)
|
||||||
# warning (only very important / critical messages are logged)
|
# warning (only very important / critical messages are logged)
|
||||||
@ -39,7 +39,7 @@ Index: redis.conf
|
|||||||
|
|
||||||
# To enable logging to the system logger, just set 'syslog-enabled' to yes,
|
# To enable logging to the system logger, just set 'syslog-enabled' to yes,
|
||||||
# and optionally update the other syslog parameters to suit your needs.
|
# and optionally update the other syslog parameters to suit your needs.
|
||||||
@@ -103,7 +103,7 @@ dbfilename dump.rdb
|
@@ -104,7 +104,7 @@ dbfilename dump.rdb
|
||||||
# Also the Append Only File will be created inside this directory.
|
# Also the Append Only File will be created inside this directory.
|
||||||
#
|
#
|
||||||
# Note that you must specify a directory here, not a file name.
|
# Note that you must specify a directory here, not a file name.
|
||||||
|
@ -1,122 +1,100 @@
|
|||||||
*** utils/redis_init_script.orig 2011-09-21 19:12:56.000000000 +0300
|
Index: utils/redis_init_script
|
||||||
--- utils/redis_init_script 2011-10-10 18:34:43.000000000 +0300
|
===================================================================
|
||||||
***************
|
--- utils/redis_init_script.orig 2011-10-17 10:46:00.000000000 +0200
|
||||||
*** 1,42 ****
|
+++ utils/redis_init_script 2011-10-24 12:47:43.108960720 +0200
|
||||||
#!/bin/sh
|
@@ -1,42 +1,75 @@
|
||||||
#
|
#!/bin/sh
|
||||||
! # Simple Redis init.d script conceived to work on Linux systems
|
#
|
||||||
! # as it does use of the /proc filesystem.
|
-# Simple Redis init.d script conceived to work on Linux systems
|
||||||
|
-# as it does use of the /proc filesystem.
|
||||||
REDISPORT=6379
|
+# /etc/init.d/redis
|
||||||
! EXEC=/usr/local/bin/redis-server
|
+#
|
||||||
! CLIEXEC=/usr/local/bin/redis-cli
|
+### BEGIN INIT INFO
|
||||||
|
+# Provides: redis
|
||||||
PIDFILE=/var/run/redis_${REDISPORT}.pid
|
+# Required-Start: $syslog $remote_fs
|
||||||
! CONF="/etc/redis/${REDISPORT}.conf"
|
+# Should-Start:
|
||||||
|
+# Required-Stop: $syslog $remote_fs
|
||||||
case "$1" in
|
+# Should-Stop:
|
||||||
start)
|
+# Default-Start: 3 4 5
|
||||||
! if [ -f $PIDFILE ]
|
+# Default-Stop: 0 1 2 6
|
||||||
! then
|
+# Short-Description: Redis server
|
||||||
! echo "$PIDFILE exists, process is already running or crashed"
|
+# Description: Starts and stops the Redis daemon
|
||||||
! else
|
+### END INIT INFO
|
||||||
! echo "Starting Redis server..."
|
+
|
||||||
! $EXEC $CONF
|
+. /etc/rc.status
|
||||||
fi
|
|
||||||
;;
|
REDISPORT=6379
|
||||||
stop)
|
-EXEC=/usr/local/bin/redis-server
|
||||||
if [ ! -f $PIDFILE ]
|
-CLIEXEC=/usr/local/bin/redis-cli
|
||||||
then
|
+EXEC=/usr/sbin/redis-server
|
||||||
! echo "$PIDFILE does not exist, process is not running"
|
+CLIEXEC=/usr/bin/redis-cli
|
||||||
else
|
|
||||||
! PID=$(cat $PIDFILE)
|
-PIDFILE=/var/run/redis_${REDISPORT}.pid
|
||||||
! echo "Stopping ..."
|
-CONF="/etc/redis/${REDISPORT}.conf"
|
||||||
$CLIEXEC -p $REDISPORT shutdown
|
+CONF=/etc/redis.conf
|
||||||
! while [ -x /proc/${PID} ]
|
+PIDFILE=/var/run/redis.pid
|
||||||
do
|
+LOGFILE=/var/log/redis/redis.log
|
||||||
- echo "Waiting for Redis to shutdown ..."
|
|
||||||
sleep 1
|
case "$1" in
|
||||||
done
|
start)
|
||||||
- echo "Redis stopped"
|
- if [ -f $PIDFILE ]
|
||||||
fi
|
- then
|
||||||
;;
|
- echo "$PIDFILE exists, process is already running or crashed"
|
||||||
! *)
|
- else
|
||||||
! echo "Please use start or stop as first argument"
|
- echo "Starting Redis server..."
|
||||||
;;
|
- $EXEC $CONF
|
||||||
esac
|
+ if [ ! -r $LOGFILE ]; then
|
||||||
--- 1,75 ----
|
+ touch $LOGFILE
|
||||||
#!/bin/sh
|
+ chown redis:redis $LOGFILE
|
||||||
#
|
+ fi
|
||||||
! # /etc/init.d/redis
|
+ # Create a pidfile the server can write into.
|
||||||
! #
|
+ if [ ! -r $PIDFILE ]; then
|
||||||
! ### BEGIN INIT INFO
|
+ touch $PIDFILE
|
||||||
! # Provides: redis
|
+ chown redis:redis $PIDFILE
|
||||||
! # Required-Start: $syslog $remote_fs
|
fi
|
||||||
! # Should-Start:
|
+ echo -n "Starting service Redis "
|
||||||
! # Required-Stop: $syslog $remote_fs
|
+ /sbin/startproc -u redis -g redis -p $PIDFILE -s -e $EXEC $CONF >/dev/null 2>&1
|
||||||
! # Should-Stop:
|
+ rc_status -v
|
||||||
! # Default-Start: 3 4 5
|
;;
|
||||||
! # Default-Stop: 0 1 2 6
|
stop)
|
||||||
! # Short-Description: Redis server
|
if [ ! -f $PIDFILE ]
|
||||||
! # Description: Starts and stops the Redis daemon
|
then
|
||||||
! ### END INIT INFO
|
- echo "$PIDFILE does not exist, process is not running"
|
||||||
!
|
+ echo -n "$PIDFILE does not exist, process is not running"
|
||||||
! . /etc/rc.status
|
+ rc_failed
|
||||||
|
else
|
||||||
REDISPORT=6379
|
- PID=$(cat $PIDFILE)
|
||||||
! EXEC=/usr/sbin/redis-server
|
- echo "Stopping ..."
|
||||||
! CLIEXEC=/usr/sbin/redis-cli
|
+ echo -n "Stopping service Redis..."
|
||||||
|
$CLIEXEC -p $REDISPORT shutdown
|
||||||
+ CONF=/etc/redis/${REDISPORT}.conf
|
- while [ -x /proc/${PID} ]
|
||||||
PIDFILE=/var/run/redis_${REDISPORT}.pid
|
+ PID=$(cat $PIDFILE)
|
||||||
! LOGFILE=/var/log/redis_${REDISPORT}.log
|
+ while [ -x /proc/${PIDFILE} ]
|
||||||
|
do
|
||||||
case "$1" in
|
- echo "Waiting for Redis to shutdown ..."
|
||||||
start)
|
sleep 1
|
||||||
! if [ ! -r $LOGFILE ]; then
|
done
|
||||||
! touch $LOGFILE
|
- echo "Redis stopped"
|
||||||
! chown redis:redis $LOGFILE
|
fi
|
||||||
! fi
|
+ rc_status -v
|
||||||
! # Create a pidfile the server can write into.
|
;;
|
||||||
! if [ ! -r $PIDFILE ]; then
|
- *)
|
||||||
! touch $PIDFILE
|
- echo "Please use start or stop as first argument"
|
||||||
! chown redis:redis $PIDFILE
|
+ restart)
|
||||||
fi
|
+ $0 stop
|
||||||
+ echo -n "Starting service Redis "
|
+ $0 start
|
||||||
+ /sbin/startproc -u redis -g redis -p $PIDFILE -s -e $EXEC $CONF >/dev/null 2>&1
|
;;
|
||||||
+ rc_status -v
|
+ reload)
|
||||||
;;
|
+ $0 restart
|
||||||
stop)
|
+ ;;
|
||||||
if [ ! -f $PIDFILE ]
|
+ status)
|
||||||
then
|
+ echo -n "Checking for service Redis: "
|
||||||
! echo -n "$PIDFILE does not exist, process is not running"
|
+ /sbin/checkproc -p $PIDFILE $EXEC
|
||||||
! rc_failed
|
+ rc_status -v
|
||||||
else
|
+ ;;
|
||||||
! echo -n "Stopping service Redis..."
|
+ *)
|
||||||
$CLIEXEC -p $REDISPORT shutdown
|
+ echo $"Usage: $0 {start|stop|status|restart|reload}"
|
||||||
! PID=$(cat $PIDFILE)
|
+ exit 1
|
||||||
! while [ -x /proc/${PIDFILE} ]
|
esac
|
||||||
do
|
+rc_exit
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
+ rc_status -v
|
|
||||||
;;
|
|
||||||
! restart)
|
|
||||||
! $0 stop
|
|
||||||
! $0 start
|
|
||||||
;;
|
|
||||||
+ reload)
|
|
||||||
+ $0 restart
|
|
||||||
+ ;;
|
|
||||||
+ status)
|
|
||||||
+ echo -n "Checking for service Redis: "
|
|
||||||
+ /sbin/checkproc -p $PIDFILE $EXEC
|
|
||||||
+ rc_status -v
|
|
||||||
+ ;;
|
|
||||||
+ *)
|
|
||||||
+ echo $"Usage: $0 {start|stop|status|restart|reload}"
|
|
||||||
+ exit 1
|
|
||||||
esac
|
|
||||||
+ rc_exit
|
|
||||||
+
|
+
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Oct 24 10:48:19 UTC 2011 - asn@cryptomilk.org
|
||||||
|
|
||||||
|
- Updated to 2.4.1.
|
||||||
|
- Fixed init script.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue May 24 09:39:19 UTC 2011 - prusnak@opensuse.org
|
Tue May 24 09:39:19 UTC 2011 - prusnak@opensuse.org
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user