1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-15 04:32:11 +00:00
iiab/scripts/netwarn.sh

30 lines
769 B
Bash
Raw Normal View History

2022-07-19 01:33:08 +00:00
#!/bin/sh
if [ -f /etc/iiab/install-flags/iiab-network-complete ]; then
exit
fi
zenity --question --width=350 --text="IIAB needs to configure networking:\n\n► Internet must be live before you begin.\n►You might be prompted for your password.\n\nContinue?"
case $? in
-1|5)
2022-07-17 20:15:56 +00:00
exit 1
2022-07-19 01:33:08 +00:00
;;
1)
2022-07-17 20:15:56 +00:00
exit 0
2022-07-19 01:33:08 +00:00
;;
0)
x-terminal-emulator -e /usr/local/bin/iiab-network
;;
esac
if [ "$?" = "1" ]; then
zenity --warning --width=350 --text="iiab-network exited with error.\n\nPlease review /opt/iiab/iiab/iiab-network.log"
exit 1
fi
zenity --question --width=350 --text="iiab-network complete.\n\nWould you like to REBOOT now? (Recommended)"
if [ "$?" = "0" ]; then
x-terminal-emulator -e "sudo reboot"
fi