mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Conditional prompt for reboot
This commit is contained in:
parent
cc6fe6f2ac
commit
4d2d79b404
@ -326,13 +326,17 @@ function optimize_php() {
|
|||||||
function install_complete() {
|
function install_complete() {
|
||||||
install_log "Installation completed!"
|
install_log "Installation completed!"
|
||||||
|
|
||||||
echo -n "The system needs to be rebooted as a final step. Reboot now? [y/N]: "
|
# Prompt to reboot if wired ethernet (eth0) is connected.
|
||||||
read answer
|
# With default_configuration this will create an active AP on restart.
|
||||||
if [[ $answer != "y" ]]; then
|
if ip a | grep -q ': eth0:.*state UP'; then
|
||||||
echo "Installation reboot aborted."
|
echo -n "The system needs to be rebooted as a final step. Reboot now? [y/N]: "
|
||||||
exit 0
|
read answer
|
||||||
|
if [[ $answer != "y" ]]; then
|
||||||
|
echo "Installation reboot aborted."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
sudo shutdown -r now || install_error "Unable to execute shutdown"
|
||||||
fi
|
fi
|
||||||
sudo shutdown -r now || install_error "Unable to execute shutdown"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function install_raspap() {
|
function install_raspap() {
|
||||||
|
Loading…
Reference in New Issue
Block a user