From f1efc97357695a7e1fc1c1b6eab23891051e23e8 Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Tue, 1 Nov 2016 11:04:33 -0700 Subject: [PATCH] Clairfy condition to make sure they operate as per the specs of the logic flow layout. --- advanced/Scripts/update.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/advanced/Scripts/update.sh b/advanced/Scripts/update.sh index a2220d57..a743b549 100644 --- a/advanced/Scripts/update.sh +++ b/advanced/Scripts/update.sh @@ -104,12 +104,12 @@ echo ":::" -if [[ ${piholeVersion} == ${piholeVersionLatest} && ${webVersion} == ${webVersionLatest} ]]; then +if [[ ${piholeVersion} == ${piholeVersionLatest} ]] && [[ ${webVersion} == ${webVersionLatest} ]]; then echo "::: Everything is up to date!" echo "" exit 0 -elif [[ ${piholeVersion} == ${piholeVersionLatest} && ${webVersion} != ${webVersionLatest} ]]; then +elif [[ ${piholeVersion} == ${piholeVersionLatest} ]] && [[ ${webVersion} != ${webVersionLatest} ]]; then echo "::: Pi-hole Web Admin files out of date" getGitFiles ${webInterfaceDir} ${webInterfaceGitUrl} echo ":::" @@ -117,7 +117,7 @@ elif [[ ${piholeVersion} == ${piholeVersionLatest} && ${webVersion} != ${webVers echo "::: Web Admin version is now at ${webVersion}" echo "::: If you had made any changes in '/var/www/html/admin', they have been stashed using 'git stash'" echo "" -elif [[ ${piholeVersion} != ${piholeVersionLatest} && ${webVersion} == ${webVersionLatest} ]]; then +elif [[ ${piholeVersion} != ${piholeVersionLatest} ]] && [[ ${webVersion} == ${webVersionLatest} ]]; then echo "::: Pi-hole core files out of date" getGitFiles ${piholeFilesDir} ${piholeGitUrl} /etc/.pihole/automated\ install/basic-install.sh --reconfigure --unattended @@ -126,7 +126,7 @@ elif [[ ${piholeVersion} != ${piholeVersionLatest} && ${webVersion} == ${webVers echo "::: Pi-hole version is now at ${piholeVersion}" echo "::: If you had made any changes in '/etc/.pihole', they have been stashed using 'git stash'" echo "" -elif [[ ${piholeVersion} != ${piholeVersionLatest} && ${webVersion} != ${webVersionLatest} ]]; then +elif [[ ${piholeVersion} != ${piholeVersionLatest} ]] && [[ ${webVersion} != ${webVersionLatest} ]]; then echo "::: Updating Everything" getGitFiles ${piholeFilesDir} ${piholeGitUrl} /etc/.pihole/automated\ install/basic-install.sh --unattended