File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,7 @@ if [[ ("$UsingSSH" == "yes") ]]; then
144
144
echo
145
145
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 "
146
146
exit 0
147
+ ask_reboot
147
148
fi
148
149
149
150
# New User Password Login Creation
@@ -260,6 +261,7 @@ case $response in
260
261
echo
261
262
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 "
262
263
exit 0
264
+ ask_reboot
263
265
;;
264
266
265
267
1)
Original file line number Diff line number Diff line change @@ -91,6 +91,14 @@ function install_end_message() {
91
91
92
92
}
93
93
94
+ # A function to ask if the user wants to reboot the system
95
+ function ask_reboot() {
96
+ read -p " Do you want to reboot the system? (y/n): " reboot_choice
97
+ if [[ " $reboot_choice " == " y" ]]; then
98
+ sudo reboot
99
+ fi
100
+ }
101
+
94
102
function term_art() {
95
103
clear
96
104
Original file line number Diff line number Diff line change @@ -111,10 +111,7 @@ print_message() {
111
111
}
112
112
113
113
term_yiimpool
114
-
115
- # Call print_message regardless of UsingDomain
116
114
print_message
117
-
118
115
exit 0
119
-
116
+ ask_reboot
120
117
You can’t perform that action at this time.
0 commit comments