From a77e4339a0887fc29075e118fcedb0c779c13534 Mon Sep 17 00:00:00 2001 From: Naimul Hasan <23284131+agent47nh@users.noreply.github.com> Date: Sat, 30 Dec 2023 11:32:08 +0100 Subject: [PATCH] pihole -r: Fix WebUI not resetting or installing correctly Signed-off-by: Naimul Hasan <23284131+agent47nh@users.noreply.github.com> --- automated install/basic-install.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 4c69788f..796fccb8 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -2177,14 +2177,20 @@ clone_or_update_repos() { { printf " %b Unable to reset %s, exiting installer%b\\n" "${COL_LIGHT_RED}" "${PI_HOLE_LOCAL_REPO}" "${COL_NC}"; \ exit 1; \ } - # If the Web interface was installed, + # If the Web interface was selected for installation, if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then - # reset it's repo - resetRepo ${webInterfaceDir} || \ - { printf " %b Unable to reset %s, exiting installer%b\\n" "${COL_LIGHT_RED}" "${webInterfaceDir}" "${COL_NC}"; \ + # get the Web git files + getGitFiles ${webInterfaceDir} ${webInterfaceGitUrl} || \ + { printf " %b Unable to clone %s into ${webInterfaceDir}, exiting installer%b\\n" "${COL_LIGHT_RED}" "${webInterfaceGitUrl}" "${COL_NC}"; \ exit 1; \ } + # If the Web interface was not selected for installation, + else + # reset it's repo + resetRepo ${webInterfaceDir} || \ + { printf " %b Unable to reset %s, exiting installer%b\\n" "${COL_LIGHT_RED}" "${webInterfaceDir}, did not likely exist before" "${COL_NC}"; } fi + # Otherwise, a repair is happening else # so get git files for Core