1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-21 22:38:08 +00:00

Only source versions file if the file exits (#5157)

This commit is contained in:
Adam Warner 2023-02-09 18:34:09 +00:00 committed by GitHub
commit 0ac89ac2e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

7
pihole
View File

@ -24,7 +24,12 @@ utilsfile="${PI_HOLE_SCRIPT_DIR}/utils.sh"
source "${utilsfile}"
versionsfile="/etc/pihole/versions"
source "${versionsfile}"
if [ -f "${versionsfile}" ]; then
# Only source versionsfile if the file exits
# fixes a warning during installation where versionsfile does not exist yet
# but gravity calls `pihole -status` and thereby sourcing the file
source "${versionsfile}"
fi
webpageFunc() {
source "${PI_HOLE_SCRIPT_DIR}/webpage.sh"