mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-03 12:40:56 +00:00
adjust text in update_dialogs() whiptail
This commit is contained in:
parent
e612003293
commit
3a9b39b842
@ -42,7 +42,7 @@ c=$(( columns / 2 ))
|
||||
|
||||
######## Undocumented Flags. Shhh ########
|
||||
skipSpaceCheck=false
|
||||
skipRepoUpdate=false
|
||||
reconfigure=false
|
||||
runUnattended=false
|
||||
|
||||
######## FIRST CHECK ########
|
||||
@ -864,10 +864,22 @@ View the web interface at http://pi.hole/admin or http://${IPv4_address%/*}/admi
|
||||
}
|
||||
|
||||
update_dialogs(){
|
||||
# reconfigure
|
||||
if [ "$reconfigure" = true ]; then
|
||||
opt1a="Refresh"
|
||||
opt1b="Refresh will retain existing settings"
|
||||
strAdd="You will remain on the same version"
|
||||
else
|
||||
opt1a="Update"
|
||||
opt1b="Update will retain existing settings."
|
||||
strAdd="You will be updated to the latest version."
|
||||
fi
|
||||
opt2a="Reconfigure"
|
||||
opt2b="Reconfigure will allow you to enter new settings"
|
||||
|
||||
UpdateCmd=$(whiptail --title "Existing Install Detected!" --menu "\n\nWe have detected an existing install.\n\nPlease choose from the following options:" ${r} ${c} 2 \
|
||||
"Update" "Update install will retain existing settings." \
|
||||
"Install" "Install will allow you to enter new settings." 3>&2 2>&1 1>&3)
|
||||
UpdateCmd=$(whiptail --title "Existing Install Detected!" --menu "\n\nWe have detected an existing install.\n\nPlease choose from the following options: \n($strAdd)" ${r} ${c} 2 \
|
||||
"$opt1a" "$opt1b" \
|
||||
"$opt2a" "$opt2b" 3>&2 2>&1 1>&3)
|
||||
|
||||
if [[ $? = 0 ]];then
|
||||
case ${UpdateCmd} in
|
||||
@ -889,12 +901,11 @@ update_dialogs(){
|
||||
}
|
||||
|
||||
main() {
|
||||
|
||||
# Check arguments for the undocumented flags
|
||||
for var in "$@"
|
||||
do
|
||||
case "$var" in
|
||||
"--reconfigure" ) skipRepoUpdate=true;;
|
||||
"--reconfigure" ) reconfigure=true;;
|
||||
"--i_do_not_follow_recommendations" ) skipSpaceCheck=false;;
|
||||
"--unattended" ) runUnattended=true;;
|
||||
esac
|
||||
@ -929,7 +940,7 @@ install_dependent_packages INSTALLER_DEPS[@]
|
||||
# Install packages used by the Pi-hole
|
||||
install_dependent_packages PIHOLE_DEPS[@]
|
||||
|
||||
if [[ "$skipRepoUpdate" = true ]]; then
|
||||
if [[ "$reconfigure" = true ]]; then
|
||||
echo "::: --reconfigure passed to install script. Not downloading/updating local repos"
|
||||
else
|
||||
# Get Git files for Core and Admin
|
||||
|
Loading…
Reference in New Issue
Block a user