mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-23 06:33:44 +00:00
Only source versions file if the file exits
Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
parent
460f83580e
commit
ca00ffa101
1 changed files with 6 additions and 1 deletions
7
pihole
7
pihole
|
@ -24,7 +24,12 @@ utilsfile="${PI_HOLE_SCRIPT_DIR}/utils.sh"
|
||||||
source "${utilsfile}"
|
source "${utilsfile}"
|
||||||
|
|
||||||
versionsfile="/etc/pihole/versions"
|
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() {
|
webpageFunc() {
|
||||||
source "${PI_HOLE_SCRIPT_DIR}/webpage.sh"
|
source "${PI_HOLE_SCRIPT_DIR}/webpage.sh"
|
||||||
|
|
Loading…
Reference in a new issue