mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-27 07:12:27 +00:00
move the sourcing of utils.sh outside of installPihole (#5825)
This commit is contained in:
commit
a41426474e
1 changed files with 9 additions and 9 deletions
|
@ -1685,15 +1685,6 @@ installPihole() {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# /opt/pihole/utils.sh should be installed by installScripts now, so we can use it
|
|
||||||
if [ -f "${PI_HOLE_INSTALL_DIR}/utils.sh" ]; then
|
|
||||||
# shellcheck disable=SC1091
|
|
||||||
source "${PI_HOLE_INSTALL_DIR}/utils.sh"
|
|
||||||
else
|
|
||||||
printf " %b Failure: /opt/pihole/utils.sh does not exist .\\n" "${CROSS}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
remove_old_dnsmasq_ftl_configs
|
remove_old_dnsmasq_ftl_configs
|
||||||
remove_old_pihole_lighttpd_configs
|
remove_old_pihole_lighttpd_configs
|
||||||
|
|
||||||
|
@ -2426,6 +2417,15 @@ main() {
|
||||||
# Install and log everything to a file
|
# Install and log everything to a file
|
||||||
installPihole | tee -a /proc/$$/fd/3
|
installPihole | tee -a /proc/$$/fd/3
|
||||||
|
|
||||||
|
# /opt/pihole/utils.sh should be installed by installScripts now, so we can use it
|
||||||
|
if [ -f "${PI_HOLE_INSTALL_DIR}/utils.sh" ]; then
|
||||||
|
# shellcheck disable=SC1091
|
||||||
|
source "${PI_HOLE_INSTALL_DIR}/utils.sh"
|
||||||
|
else
|
||||||
|
printf " %b Failure: /opt/pihole/utils.sh does not exist .\\n" "${CROSS}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Copy the temp log file into final log location for storage
|
# Copy the temp log file into final log location for storage
|
||||||
copy_to_install_log
|
copy_to_install_log
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue