diff --git a/update b/update index 61e62873..685466d0 100755 --- a/update +++ b/update @@ -268,20 +268,26 @@ if [ $changed -eq 1 ]; then echo fi -if [ $FLAG -eq 1 ]; then - echo "systemctl daemon-reload and reboot" - sudo systemctl daemon-reload - sudo reboot -h now +if [ "$noreboot" = "0" ] ; then + + if [ $FLAG -eq 1 ]; then + echo "systemctl daemon-reload and reboot" + sudo systemctl daemon-reload + sudo reboot -h now # sudo systemctl restart cubesatsim -else - grep 'changed' /home/pi/CubeSatSim/.updated - if [[ $(grep 'changed' /home/pi/CubeSatSim/.updated) ]]; then - echo "reboot" - sudo reboot -h now + else + grep 'changed' /home/pi/CubeSatSim/.updated + if [[ $(grep 'changed' /home/pi/CubeSatSim/.updated) ]]; then + echo "reboot" + sudo reboot -h now # sudo systemctl restart cubesatsim - else - echo "nothing to do." - fi + else + echo "nothing to do." + fi + fi +else + + echo "Reboot disabled" fi - - echo "CubeSatSim update complete." + +echo "CubeSatSim update complete."