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 ...@@ -15,21 +15,22 @@ if [ -f "$JETTY_PID_FILE" ]; then
PID=`cat $JETTY_PID_FILE` PID=`cat $JETTY_PID_FILE`
count=0 count=0
while [ 1 ]; do while [ 1 ]; do
isPIDRunning $PID isPIDRunning $PID
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
break break
fi fi
count=$(($count+1)) count=$(($count+1))
if [ $count -eq 10 ]; then if [ $count -eq 10 ]; then
break break
fi fi
sleep 1 sleep 1
done done
isPIDRunning $PID isPIDRunning $PID
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
rm -f "$JETTY_PID_FILE" rm -f "$JETTY_PID_FILE"
else else
echo "Failed to shutdown PID $PID." > /dev/stderr echo "Failed to shutdown process $PID." > /dev/stderr
fi exit 1
fi fi
\ No newline at end of file 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