fix several bugs of init.d scripts
- PIDFILE environ variable was not properly retrieved - chkconfig command failed
This commit is contained in:
parent
96e9f8d5e3
commit
c4286feabe
@ -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..."
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user