Skip to content
Snippets Groups Projects
Commit 8b94c9a3 authored by brinn's avatar brinn
Browse files

Make shutdown.sh exit with an exit value of 1 if the process couldn't be stopped.

SVN: 26505
parent a6fc965f
No related branches found
No related tags found
No related merge requests found
......@@ -15,21 +15,22 @@ if [ -f "$JETTY_PID_FILE" ]; then
PID=`cat $JETTY_PID_FILE`
count=0
while [ 1 ]; do
isPIDRunning $PID
if [ $? -ne 0 ]; then
break
fi
count=$(($count+1))
if [ $count -eq 10 ]; then
break
fi
sleep 1
done
isPIDRunning $PID
if [ $? -ne 0 ]; then
rm -f "$JETTY_PID_FILE"
else
echo "Failed to shutdown PID $PID." > /dev/stderr
fi
fi
\ No newline at end of file
isPIDRunning $PID
if [ $? -ne 0 ]; then
break
fi
count=$(($count+1))
if [ $count -eq 10 ]; then
break
fi
sleep 1
done
isPIDRunning $PID
if [ $? -ne 0 ]; then
rm -f "$JETTY_PID_FILE"
else
echo "Failed to shutdown process $PID." > /dev/stderr
exit 1
fi
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment