]> git.saurik.com Git - redis.git/commitdiff
fix several bugs of init.d scripts
authorquiver <george@alpamayo.(none)>
Fri, 4 May 2012 11:07:00 +0000 (20:07 +0900)
committerquiver <george@alpamayo.(none)>
Fri, 4 May 2012 11:07:00 +0000 (20:07 +0900)
- PIDFILE environ variable was not properly retrieved
- chkconfig command failed

utils/install_server.sh
utils/redis_init_script.tpl

index 06570a87f7c2f6ad0e6b9ea29f36b3d071f03ae9..93b5b411b803da80c4f91a94b4e28cb981e2ab05 100755 (executable)
@@ -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..."
index e0c5b2f88fe7fcc44a3d0c8cf62e377a78bff871..e2af1fe77571c191dab027e45f9ffecefe76432d 100755 (executable)
@@ -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