Skip to content

Instantly share code, notes, and snippets.

@asayamakk
Last active January 13, 2018 07:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asayamakk/c57cd901781cf521046e38ecb96824a3 to your computer and use it in GitHub Desktop.
Save asayamakk/c57cd901781cf521046e38ecb96824a3 to your computer and use it in GitHub Desktop.
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