From: quiver Date: Fri, 4 May 2012 11:07:00 +0000 (+0900) Subject: fix several bugs of init.d scripts X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/c4286feabef25b417d05251e4a63ef769ac4cfad?ds=inline;hp=-c fix several bugs of init.d scripts - PIDFILE environ variable was not properly retrieved - chkconfig command failed --- c4286feabef25b417d05251e4a63ef769ac4cfad diff --git a/utils/install_server.sh b/utils/install_server.sh index 06570a87..93b5b411 100755 --- a/utils/install_server.sh +++ b/utils/install_server.sh @@ -166,7 +166,7 @@ if [[ ! `which chkconfig` ]] ; then else # we're chkconfig, so lets add to chkconfig and put in runlevel 345 chkconfig --add redis_$REDIS_PORT && echo "Successfully added to chkconfig!" - chkconfig--level 345 redis_$REDIS_PORT on && echo "Successfully added to runlevels 345!" + chkconfig --level 345 redis_$REDIS_PORT on && echo "Successfully added to runlevels 345!" fi /etc/init.d/redis_$REDIS_PORT start || die "Failed starting service..." diff --git a/utils/redis_init_script.tpl b/utils/redis_init_script.tpl index e0c5b2f8..e2af1fe7 100755 --- a/utils/redis_init_script.tpl +++ b/utils/redis_init_script.tpl @@ -1,7 +1,7 @@ case "$1" in start) - if [ -f $$PIDFILE ] + if [ -f $PIDFILE ] then echo "$PIDFILE exists, process is already running or crashed" else