diff --git a/mister_updater.sh b/mister_updater.sh index 062709c..44f5c5b 100755 --- a/mister_updater.sh +++ b/mister_updater.sh @@ -153,7 +153,7 @@ UNRAR_DEBS_URL="http://http.us.debian.org/debian/pool/non-free/u/unrar-nonfree" #Uncomment this if you want the script to sync the system date and time with a NTP server #NTP_SERVER="0.pool.ntp.org" AUTOREBOOT="true" -REBOOT_PAUSE=0 +REBOOT_PAUSE=0 # in seconds TEMP_PATH="/tmp" TO_BE_DELETED_EXTENSION="to_be_deleted" @@ -744,16 +744,14 @@ then fi echo "Done!" -if [ $REBOOT_NEEDED == "true" ] -then - if [ $AUTOREBOOT == "true" ] - then - echo "Rebooting in $REBOOT_PAUSE seconds" - sleep $REBOOT_PAUSE - reboot now - else - echo "You should reboot" - fi +if [[ "${REBOOT_NEEDED}" == "true" ]] ; then + if [[ "${AUTOREBOOT}" == "true" && "${REBOOT_PAUSE}" -ge 0 ]] ; then + echo "Rebooting in ${REBOOT_PAUSE} seconds" + sleep "${REBOOT_PAUSE}" + reboot now + else + echo "You should reboot" + fi fi exit 0