Skip to content

Commit

Permalink
Add ask_reboot Func
Browse files Browse the repository at this point in the history
  • Loading branch information
afiniel committed Jan 17, 2025
1 parent e2b6919 commit 04a89b3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions install/create_user.sh
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ if [[ ("$UsingSSH" == "yes") ]]; then
echo
echo -e "$RED Please reboot the system and log in as$GREEN ${yiimpadmin} $YELLOW and type$GREEN yiimpool$YELLOW to$GREEN continu$YELLOW setup...$NC"
exit 0
ask_reboot
fi

# New User Password Login Creation
Expand Down Expand Up @@ -260,6 +261,7 @@ case $response in
echo
echo -e "$RED Please reboot the system and log in as:$GREEN ${yiimpadmin} $YELLOW and type$GREEN yiimpool$YELLOW to$GREEN continu$YELLOW setup...$NC"
exit 0
ask_reboot
;;

1)
Expand Down
8 changes: 8 additions & 0 deletions install/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ function install_end_message() {

}

# A function to ask if the user wants to reboot the system
function ask_reboot() {
read -p "Do you want to reboot the system? (y/n): " reboot_choice
if [[ "$reboot_choice" == "y" ]]; then
sudo reboot
fi
}

function term_art() {
clear

Expand Down
5 changes: 1 addition & 4 deletions yiimp_single/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,7 @@ print_message() {
}

term_yiimpool

# Call print_message regardless of UsingDomain
print_message

exit 0

ask_reboot

0 comments on commit 04a89b3

Please sign in to comment.