From f37b2bc7c18abfdfff802fa6dc45b3d259f39654 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Mon, 2 Apr 2018 23:22:06 +0100 Subject: [PATCH] move call to `get_binary_name` into `FTLcheckUpdate()` to avoid having to run that first Signed-off-by: Adam Warner --- advanced/Scripts/update.sh | 2 -- automated install/basic-install.sh | 14 ++++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/advanced/Scripts/update.sh b/advanced/Scripts/update.sh index d80edca2..0f9f9783 100755 --- a/advanced/Scripts/update.sh +++ b/advanced/Scripts/update.sh @@ -110,8 +110,6 @@ main() { echo -e " ${INFO} Pi-hole Core:\\t${COL_LIGHT_GREEN}up to date${COL_NC}" fi - get_binary_name > /dev/null # Needed so that we have the correct binary name for the FTL Update check function - if FTLcheckUpdate > /dev/null; then FTL_update=true echo -e " ${INFO} FTL:\\t\\t${COL_YELLOW}update available${COL_NC}" diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index d9c4b8f9..8ade6796 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -1893,7 +1893,14 @@ get_binary_name() { FTLcheckUpdate() { - local ftlLoc=$(which pihole-FTL 2>/dev/null) + get_binary_name + + #In the next section we check to see if FTL is already installed (in case of pihole -r). + #If the installed version matches the latest version, then check the installed sha1sum of the binary vs the remote sha1sum. If they do not match, then download + echo -e " ${INFO} Checking for existing FTL binary..." + + local ftlLoc + ftlLoc=$(which pihole-FTL 2>/dev/null) local ftlBranch @@ -1957,11 +1964,6 @@ FTLdetect() { echo "" echo -e " ${INFO} FTL Checks..." - get_binary_name - - #In the next section we check to see if FTL is already installed (in case of pihole -r). - #If the installed version matches the latest version, then check the installed sha1sum of the binary vs the remote sha1sum. If they do not match, then download - echo -e " ${INFO} Checking for existing FTL binary..." if FTLcheckUpdate ; then FTLinstall "${binary}" || return 1 fi