script improvements

This commit is contained in:
2026-04-23 09:39:06 +02:00
parent 2191db7a43
commit 0a735a2690
5 changed files with 218 additions and 419 deletions
+17 -12
View File
@@ -228,15 +228,20 @@ case "$INSTALL_LEVEL" in
esac
say_green "Debian setup complete."
say_red "The installation has finished. A reboot is recommended before continuing."
read -rp "Reboot now? [y/N]: " reboot_choice
case "${reboot_choice,,}" in
y|yes)
say_red "Rebooting now."
sudo reboot
;;
*)
say_yellow "Skipping reboot. Make sure to reboot manually before continuing upgrades."
exit 0
;;
esac
say_red "The installation has finished. A reboot is recommended."
# Reboots are dangerous to automate; we use a shorter timeout and default to No
if read -t 10 -rp "Reboot now? [y/N]: " reboot_choice; then
case "${reboot_choice,,}" in
y|yes)
say_red "Rebooting now."
sudo reboot
;;
*)
say_yellow "Skipping reboot."
exit 0
;;
esac
else
say_yellow "\nNo input detected. Skipping reboot for safety."
exit 0
fi