Skip to content

Commit

Permalink
Allow /etc/init start after sigterm from system or user
Browse files Browse the repository at this point in the history
  • Loading branch information
waltercool committed Dec 19, 2016
1 parent 058add3 commit df25f3b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions templates/default/redis.init.erb
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ case "$1" in
if [ -f $PIDFILE ]
then
echo "$PIDFILE exists, process is already running or crashed"
PIDNUM=`cat $PIDFILE`
PROCESS_RUNNING=`ps --no-headers -q $PIDNUM | wc -l`
if [ ! $PROCESS_RUNNING -eq 1 ]
then
echo "The PID doesn't exists, restarting it."
rm $PIDFILE
eval $EXEC
fi
else
echo "Starting Redis server..."
eval $EXEC
Expand Down

0 comments on commit df25f3b

Please sign in to comment.