wrap update logic in admin_installed bool check

pull/1182/head
Promofaux 7 years ago
parent 1428b58dde
commit ba0abdb88d

@ -169,7 +169,6 @@ main() {
web_update=false
echo "::: Web Interface: up to date"
fi
fi
# Logic
# If Core up to date AND web up to date:
@ -206,6 +205,19 @@ main() {
echo "*** Update script has malfunctioned, fallthrough reached. Please contact support"
exit 1
fi
else
if ! ${core_update}; then
echo ":::"
echo "::: Everything is up to date!"
exit 0
else
echo ":::"
echo "::: Pi-hole core files out of date"
getGitFiles "${PI_HOLE_FILES_DIR}" "${PI_HOLE_GIT_URL}"
/etc/.pihole/automated\ install/basic-install.sh --reconfigure --unattended || echo "Unable to complete update, contact Pi-hole" && exit 1
fi
fi
if [[ "${web_update}" == true ]]; then
web_version_current="$(/usr/local/bin/pihole version --admin --current)"
@ -221,6 +233,8 @@ main() {
echo "::: If you had made any changes in '/etc/.pihole/', they have been stashed using 'git stash'"
fi
echo ""
exit 0

Loading…
Cancel
Save