X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/f1e60d75309990b25a1763e004d7044c77c53834..6e09ad1c156f10246ccd0f2de5b11a9635e28818:/utils/install_server.sh diff --git a/utils/install_server.sh b/utils/install_server.sh index eed1e251..eedd8034 100755 --- a/utils/install_server.sh +++ b/utils/install_server.sh @@ -47,7 +47,7 @@ echo "This script will help you easily set up a running redis server #check for root user TODO: replace this with a call to "id" if [ `whoami` != "root" ] ; then - echo "ERROR: You must run this installation script as root. Sorry!\n" + echo "You must run this script as root. Sorry!" exit 1 fi @@ -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)