mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-26 09:10:13 +00:00
Ignore commented lines when reading PRIVACYLEVEL from config file (#5177)
This commit is contained in:
commit
fb032ea6e7
3 changed files with 38 additions and 3 deletions
|
@ -2612,7 +2612,8 @@ main() {
|
|||
|
||||
# Get the privacy level if it exists (default is 0)
|
||||
if [[ -f "${FTL_CONFIG_FILE}" ]]; then
|
||||
PRIVACY_LEVEL=$(sed -ne 's/PRIVACYLEVEL=\(.*\)/\1/p' "${FTL_CONFIG_FILE}")
|
||||
# use getVal from utils.sh to get PRIVACYLEVEL
|
||||
PRIVACY_LEVEL=$(getVal "${FTL_CONFIG_FILE}" "PRIVACYLEVEL")
|
||||
|
||||
# If no setting was found, default to 0
|
||||
PRIVACY_LEVEL="${PRIVACY_LEVEL:-0}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue