]> git.saurik.com Git - redis.git/commitdiff
fixes to install script and template
authordvir volk <dvir@doit9.com>
Mon, 3 Oct 2011 08:58:43 +0000 (10:58 +0200)
committerdvir volk <dvir@doit9.com>
Mon, 3 Oct 2011 08:58:43 +0000 (10:58 +0200)
utils/install_server.sh
utils/redis.conf.tpl

index d1ae0df810f2b0d4261f938519f9b0711f7df795..0ac98a79ae092668bbe2d1debc726e32d689918c 100755 (executable)
@@ -41,10 +41,18 @@ if [ !"$REDIS_CONFIG_FILE" ] ; then
        REDIS_CONFIG_FILE=$_REDIS_CONFIG_FILE
        echo "Selected default - $REDIS_CONFIG_FILE"
 fi
-
-#try and create 
+#try and create it
 mkdir -p `dirname "$REDIS_CONFIG_FILE"` || die "Could not create redis config directory"
 
+#read the redis log file path
+_REDIS_LOG_FILE="/var/log/redis_$REDIS_PORT.log"
+read -p "Please select the redis log file name [$_REDIS_LOG_FILE] " REDIS_LOG_FILE
+if [ !"$REDIS_LOG_FILE" ] ; then
+       REDIS_LOG_FILE=$_REDIS_LOG_FILE
+       echo "Selected default - $REDIS_LOG_FILE"
+fi
+
+
 #get the redis data directory
 _REDIS_DATA_DIR="/var/lib/redis/$REDIS_PORT"
 read -p "Please select the data directory for this instance [$_REDIS_DATA_DIR] " REDIS_DATA_DIR
@@ -52,9 +60,7 @@ if [ !"$REDIS_DATA_DIR" ] ; then
        REDIS_DATA_DIR=$_REDIS_DATA_DIR
        echo "Selected default - $REDIS_DATA_DIR"
 fi
-#try the data directory setting
-mkdir -p `dirname "$REDIS_DATA_DIR"` || die "Could not create redis data directory"
-
+mkdir -p $REDIS_DATA_DIR || die "Could not create redis data directory"
 
 #get the redis executable path
 _REDIS_EXECUTABLE=`which redis-server`
@@ -104,7 +110,7 @@ CONF=\"$REDIS_CONFIG_FILE\"\n\n
 echo $REDIS_INIT_HEADER > $TMP_FILE && cat $INIT_TPL_FILE >> $TMP_FILE || die "Could not write init script to $TMP_FILE"
 
 #copy to /etc/init.d
-cp -f $TMP_FILE $INIT_SCRIPT_DEST || die "Could not copy redis init script to  $INIT_SCRIPT_DEST"
+cp -f $TMP_FILE $INIT_SCRIPT_DEST && chmod +x $INIT_SCRIPT_DEST || die "Could not copy redis init script to  $INIT_SCRIPT_DEST"
 echo "Copied $TMP_FILE => $INIT_SCRIPT_DEST"
 
 #Install the service
index 0c1a07ea61daf36faede9f488dcee7271319d17a..a146fcfbb0b70f487a6a0935db7eb5b040b4d56e 100644 (file)
@@ -14,7 +14,7 @@
 
 # By default Redis does not run as a daemon. Use 'yes' if you need it.
 # Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
-daemonize no
+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.
@@ -317,7 +317,7 @@ auto-aof-rewrite-min-size 64mb
 # Max execution time of a Lua script in milliseconds.
 # This prevents that a programming error generating an infinite loop will block
 # your server forever. Set it to 0 or a negative value for unlimited execution.
-lua-time-limit 60000
+#lua-time-limit 60000
 
 ################################## SLOW LOG ###################################