Clairfy condition to make sure they operate as per the specs of the logic flow layout.

This commit is contained in:
Dan Schaper 2016-11-01 11:04:33 -07:00
parent d561600a31
commit f1efc97357
1 changed files with 4 additions and 4 deletions

View File

@ -104,12 +104,12 @@ echo ":::"
if [[ ${piholeVersion} == ${piholeVersionLatest} && ${webVersion} == ${webVersionLatest} ]]; then if [[ ${piholeVersion} == ${piholeVersionLatest} ]] && [[ ${webVersion} == ${webVersionLatest} ]]; then
echo "::: Everything is up to date!" echo "::: Everything is up to date!"
echo "" echo ""
exit 0 exit 0
elif [[ ${piholeVersion} == ${piholeVersionLatest} && ${webVersion} != ${webVersionLatest} ]]; then elif [[ ${piholeVersion} == ${piholeVersionLatest} ]] && [[ ${webVersion} != ${webVersionLatest} ]]; then
echo "::: Pi-hole Web Admin files out of date" echo "::: Pi-hole Web Admin files out of date"
getGitFiles ${webInterfaceDir} ${webInterfaceGitUrl} getGitFiles ${webInterfaceDir} ${webInterfaceGitUrl}
echo ":::" echo ":::"
@ -117,7 +117,7 @@ elif [[ ${piholeVersion} == ${piholeVersionLatest} && ${webVersion} != ${webVers
echo "::: Web Admin version is now at ${webVersion}" 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 "::: If you had made any changes in '/var/www/html/admin', they have been stashed using 'git stash'"
echo "" echo ""
elif [[ ${piholeVersion} != ${piholeVersionLatest} && ${webVersion} == ${webVersionLatest} ]]; then elif [[ ${piholeVersion} != ${piholeVersionLatest} ]] && [[ ${webVersion} == ${webVersionLatest} ]]; then
echo "::: Pi-hole core files out of date" echo "::: Pi-hole core files out of date"
getGitFiles ${piholeFilesDir} ${piholeGitUrl} getGitFiles ${piholeFilesDir} ${piholeGitUrl}
/etc/.pihole/automated\ install/basic-install.sh --reconfigure --unattended /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 "::: 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 "::: If you had made any changes in '/etc/.pihole', they have been stashed using 'git stash'"
echo "" echo ""
elif [[ ${piholeVersion} != ${piholeVersionLatest} && ${webVersion} != ${webVersionLatest} ]]; then elif [[ ${piholeVersion} != ${piholeVersionLatest} ]] && [[ ${webVersion} != ${webVersionLatest} ]]; then
echo "::: Updating Everything" echo "::: Updating Everything"
getGitFiles ${piholeFilesDir} ${piholeGitUrl} getGitFiles ${piholeFilesDir} ${piholeGitUrl}
/etc/.pihole/automated\ install/basic-install.sh --unattended /etc/.pihole/automated\ install/basic-install.sh --unattended