mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-01-23 21:09:48 +00:00
Improved updater logic
This commit is contained in:
parent
af2893d2ce
commit
078cc7660e
1 changed files with 20 additions and 7 deletions
|
@ -149,9 +149,11 @@ main() {
|
||||||
# pull pihole repo run install --unattended
|
# pull pihole repo run install --unattended
|
||||||
|
|
||||||
if ! ${core_update} && ! ${web_update} ; then
|
if ! ${core_update} && ! ${web_update} ; then
|
||||||
|
if ! ${FTL_update} ; then
|
||||||
echo ":::"
|
echo ":::"
|
||||||
echo "::: Everything is up to date!"
|
echo "::: Everything is up to date!"
|
||||||
exit 0
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
elif ! ${core_update} && ${web_update} ; then
|
elif ! ${core_update} && ${web_update} ; then
|
||||||
echo ":::"
|
echo ":::"
|
||||||
|
@ -166,7 +168,7 @@ main() {
|
||||||
|
|
||||||
elif ${core_update} && ${web_update} ; then
|
elif ${core_update} && ${web_update} ; then
|
||||||
echo ":::"
|
echo ":::"
|
||||||
echo "::: Updating Everything"
|
echo "::: Updating Pi-hole core and web admin files"
|
||||||
getGitFiles "${PI_HOLE_FILES_DIR}" "${PI_HOLE_GIT_URL}"
|
getGitFiles "${PI_HOLE_FILES_DIR}" "${PI_HOLE_GIT_URL}"
|
||||||
${PI_HOLE_FILES_DIR}/automated\ install/basic-install.sh --unattended || echo "Unable to complete update, contact Pi-hole" && exit 1
|
${PI_HOLE_FILES_DIR}/automated\ install/basic-install.sh --unattended || echo "Unable to complete update, contact Pi-hole" && exit 1
|
||||||
else
|
else
|
||||||
|
@ -175,9 +177,11 @@ main() {
|
||||||
fi
|
fi
|
||||||
else # Web Admin not installed, so only verify if core is up to date
|
else # Web Admin not installed, so only verify if core is up to date
|
||||||
if ! ${core_update}; then
|
if ! ${core_update}; then
|
||||||
|
if ! ${FTL_update} ; then
|
||||||
echo ":::"
|
echo ":::"
|
||||||
echo "::: Everything is up to date!"
|
echo "::: Everything is up to date!"
|
||||||
exit 0
|
exit 0
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo ":::"
|
echo ":::"
|
||||||
echo "::: Pi-hole core files out of date"
|
echo "::: Pi-hole core files out of date"
|
||||||
|
@ -200,6 +204,15 @@ main() {
|
||||||
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'"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ ${FTL_update} == true ]]; then
|
||||||
|
FTL_version_current="$(/usr/bin/pihole-FTL tag)"
|
||||||
|
echo ":::"
|
||||||
|
echo "::: FTL version is now at ${FTL_version_current}"
|
||||||
|
start_service pihole-FTL
|
||||||
|
enable_service pihole-FTL
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue