Skip to content

Commit

Permalink
Merge pull request #449 from JaredF/Fix_#445
Browse files Browse the repository at this point in the history
Updates mhl to treat exit code 99 as a normal restart
  • Loading branch information
JaredF committed Jul 25, 2014
2 parents a2963d4 + ad9c971 commit 8beac58
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions bin/mhl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ while [ 1 = 1 ]; do

echo
echo Deleting startup file
# rm -f mh.started
touch mh.startup

# Avoid a memory leak problem in Red Hat 8
Expand All @@ -29,13 +28,18 @@ while [ 1 = 1 ]; do
exit
fi

# if [ ! -f mh.started ]; then
if [ -f mh.startup ]; then
if [ -f mh.startup ]; then
echo mh failed on startup ... will not restart
exit
fi

echo mh had an unexpected exit ... sleep a bit, then restarting
if [ $rc = 99 ]; then
echo -n restart requested
else
echo -n mh had an unexpected exit
fi

echo " ... sleep a bit, then restarting"
date >> mh_restart.log
sleep 5

Expand Down

0 comments on commit 8beac58

Please sign in to comment.