REVISIT: Remove some references to setupVars (some files can probably go entirely...)

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
Adam Warner 2023-02-11 12:51:55 +00:00
parent a91eb48d48
commit c0e352094d
No known key found for this signature in database
5 changed files with 6 additions and 16 deletions

View file

@ -210,11 +210,6 @@ get_init_stats() {
else
temp_file=""
fi
# Test existence of setupVars config
if [[ -f "/etc/pihole/setupVars.conf" ]]; then
setupVars="/etc/pihole/setupVars.conf"
fi
}
get_sys_stats() {
@ -226,9 +221,6 @@ get_sys_stats() {
# Update every 12 refreshes (Def: every 60s)
count=$((count+1))
if [[ "$count" == "1" ]] || (( "$count" % 12 == 0 )); then
# Do not source setupVars if file does not exist
[[ -n "$setupVars" ]] && source "$setupVars"
mapfile -t ph_ver_raw < <(pihole -v -c 2> /dev/null | sed -n 's/^.* v/v/p')
if [[ -n "${ph_ver_raw[0]}" ]]; then
ph_core_ver="${ph_ver_raw[0]}"