ae0408dee9
Copy from home:pzb/redis via accept of submit request 34154 revision 5. Request was accepted with message: Reviewed ok OBS-URL: https://build.opensuse.org/request/show/34154 OBS-URL: https://build.opensuse.org/package/show/server:database/redis?expand=0&rev=4
40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
--- utils/redis_init_script.orig 2010-03-05 06:08:56.000000000 -0500
|
|
+++ utils/redis_init_script 2010-03-05 06:09:16.000000000 -0500
|
|
@@ -1,7 +1,18 @@
|
|
#!/bin/sh
|
|
+### BEGIN INIT INFO
|
|
+# Provides: redis
|
|
+# Required-Start: $syslog $remote_fs
|
|
+# Should-Start:
|
|
+# Required-Stop: $syslog $remote_fs
|
|
+# Should-Stop:
|
|
+# Default-Start: 3 5
|
|
+# Default-Stop: 0 1 2 6
|
|
+# Short-Description: Redis server
|
|
+# Description: Starts the Redis server
|
|
+### END INIT INFO
|
|
|
|
REDISPORT=6379
|
|
-EXEC=/usr/local/bin/redis-server
|
|
+EXEC=/usr/sbin/redis-server
|
|
|
|
PIDFILE=/var/run/redis_${REDISPORT}.pid
|
|
CONF="/etc/redis/${REDISPORT}.conf"
|
|
@@ -22,7 +33,7 @@
|
|
echo -n "$PIDFILE does not exist, process is not running\n"
|
|
else
|
|
echo -n "Stopping ...\n"
|
|
- echo -n "Sending SHUTDOWN\r\n" | nc localhost $REDISPORT &
|
|
+ echo -n "Sending SHUTDOWN\r\n" | netcat localhost $REDISPORT &
|
|
PID=$(cat $PIDFILE)
|
|
while [ -x /proc/${PIDFILE} ]
|
|
do
|
|
@@ -33,4 +44,7 @@
|
|
echo "Redis stopped"
|
|
fi
|
|
;;
|
|
+ *)
|
|
+ echo "Usage: rcredis [start|stop]"
|
|
+ ;;
|
|
esac
|