diff --git a/utils/install_server.sh b/utils/install_server.sh index 71c57d70dd68ed3933649ca9d70557ad85239768..eedd80342fac78b333e8bf1ee658a78263947ae0 100755 --- a/utils/install_server.sh +++ b/utils/install_server.sh @@ -99,11 +99,15 @@ if [ ! -f "$REDIS_EXECUTABLE" ] ; then fi + #render the tmplates TMP_FILE="/tmp/$REDIS_PORT.conf" TPL_FILE="./redis.conf.tpl" INIT_TPL_FILE="./redis_init_script.tpl" INIT_SCRIPT_DEST="/etc/init.d/redis_$REDIS_PORT" +PIDFILE="/var/run/redis_$REDIS_PORT.pid" + + #check the default for redis cli CLI_EXEC=`which redis-cli` @@ -126,8 +130,9 @@ REDIS_INIT_HEADER=\ #Configurations injected by install_server below....\n\n EXEC=$REDIS_EXECUTABLE\n CLIEXEC=$CLI_EXEC\n -PIDFILE=/var/run/redis_${REDIS_PORT}.pid\n +PIDFILE=$PIDFILE\n CONF=\"$REDIS_CONFIG_FILE\"\n\n +REDISPORT=\"$REDIS_PORT\"\n\n ###############\n\n" #combine the header and the template (which is actually a static footer) diff --git a/utils/redis.conf.tpl b/utils/redis.conf.tpl index a146fcfbb0b70f487a6a0935db7eb5b040b4d56e..9e2e13557124292593bae7a84a4a4ae6e951d62e 100644 --- a/utils/redis.conf.tpl +++ b/utils/redis.conf.tpl @@ -18,7 +18,7 @@ daemonize yes # When running daemonized, Redis writes a pid file in /var/run/redis.pid by # default. You can specify a custom pid file location here. -pidfile /var/run/redis.pid +pidfile $PIDFILE # Accept connections on the specified port, default is 6379. # If port 0 is specified Redis will not listen on a TCP socket.