mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-22 14:13:42 +00:00
Fix getting 'privacylevel'
Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
parent
edbaf6d697
commit
c96463bda2
1 changed files with 2 additions and 1 deletions
|
@ -2612,7 +2612,8 @@ main() {
|
||||||
|
|
||||||
# Get the privacy level if it exists (default is 0)
|
# Get the privacy level if it exists (default is 0)
|
||||||
if [[ -f "${FTL_CONFIG_FILE}" ]]; then
|
if [[ -f "${FTL_CONFIG_FILE}" ]]; then
|
||||||
PRIVACY_LEVEL=$(sed -ne 's/PRIVACYLEVEL=\(.*\)/\1/p' "${FTL_CONFIG_FILE}")
|
# get the value from $FTL_CONFIG_FILE (and ignoring all commented lines)
|
||||||
|
PRIVACY_LEVEL=$(sed -e '/^[[:blank:]]*#/d' "${FTL_CONFIG_FILE}" | grep "PRIVACYLEVEL" | awk -F "=" 'NR==1{printf$2}')
|
||||||
|
|
||||||
# If no setting was found, default to 0
|
# If no setting was found, default to 0
|
||||||
PRIVACY_LEVEL="${PRIVACY_LEVEL:-0}"
|
PRIVACY_LEVEL="${PRIVACY_LEVEL:-0}"
|
||||||
|
|
Loading…
Reference in a new issue