Instantly share code, notes, and snippets.

@asayamakk /README.md
Last active Jan 13, 2018

Embed
What would you like to do?
init_server.sh for redis on mac os

This patch expects that uncompressed redis source is at /usr/local/src/redis-4.0.6.
Please change the redis path to fit your environment.

You can find more information here (in Japanese).

--- install_server.sh.orig 2017-12-05 02:01:09.000000000 +0900
+++ install_server.sh 2018-01-13 10:23:40.000000000 +0900
@@ -153,9 +153,9 @@
#render the templates
TMP_FILE="/tmp/${REDIS_PORT}.conf"
-DEFAULT_CONFIG="${SCRIPTPATH}/../redis.conf"
-INIT_TPL_FILE="${SCRIPTPATH}/redis_init_script.tpl"
-INIT_SCRIPT_DEST="/etc/init.d/redis_${REDIS_PORT}"
+DEFAULT_CONFIG="/usr/local/src/redis-4.0.6/redis.conf"
+INIT_TPL_FILE="/usr/local/src/redis-4.0.6/utils/redis_init_script.tpl"
+INIT_SCRIPT_DEST="/tmp/redis_${REDIS_PORT}"
PIDFILE="/var/run/redis_${REDIS_PORT}.pid"
if [ ! -f "$DEFAULT_CONFIG" ]; then
@@ -271,7 +271,7 @@
echo "No supported init tool found."
fi
-/etc/init.d/redis_$REDIS_PORT start || die "Failed starting service..."
+# /etc/init.d/redis_$REDIS_PORT start || die "Failed starting service..."
#tada
echo "Installation successful!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment