2018-06-21 14:08:03 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-07-10 19:23:09 +00:00
|
|
|
SHUTDOWN=0
|
|
|
|
RESTART=1
|
2018-06-21 14:08:03 +00:00
|
|
|
|
|
|
|
INSTRUMENTATION=10
|
|
|
|
|
2018-07-10 19:23:09 +00:00
|
|
|
jar=NurseBot.jar
|
2018-06-21 14:15:37 +00:00
|
|
|
|
2018-06-21 14:08:03 +00:00
|
|
|
while true; do
|
2018-06-21 14:15:37 +00:00
|
|
|
java -jar $jar
|
2018-06-21 14:08:03 +00:00
|
|
|
ec=$?
|
|
|
|
|
|
|
|
case $ec in
|
|
|
|
$SHUTDOWN)
|
2018-07-10 19:23:09 +00:00
|
|
|
echo "Got shutdown."
|
2018-06-21 14:08:03 +00:00
|
|
|
break;;
|
|
|
|
$RESTART)
|
2018-07-10 19:23:09 +00:00
|
|
|
echo "Restart."
|
2018-06-21 14:08:03 +00:00
|
|
|
continue;;
|
|
|
|
*)
|
|
|
|
echo "This should not happen!"
|
2018-07-10 19:23:09 +00:00
|
|
|
break;;
|
2018-06-21 14:08:03 +00:00
|
|
|
esac
|
|
|
|
done
|