mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
BLOCKING -> BLOCKING_ENABLED
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
4e4d6b5d1f
commit
337cc5ca18
2 changed files with 7 additions and 7 deletions
|
@ -78,7 +78,7 @@ fi
|
|||
# gravity.list.bck and black.list.bck instead of
|
||||
# gravity.list and black.list
|
||||
detect_pihole_blocking_status() {
|
||||
if [[ "${BLOCKING}" == false ]]; then
|
||||
if [[ "${BLOCKING_ENABLED}" == false ]]; then
|
||||
echo -e " ${INFO} Pi-hole blocking is disabled"
|
||||
adList="${adList}.bck"
|
||||
blackList="${blackList}.bck"
|
||||
|
|
12
pihole
12
pihole
|
@ -192,8 +192,8 @@ Time:
|
|||
fi
|
||||
|
||||
local str="Pi-hole Disabled"
|
||||
sed -i "/BLOCKING=/d" "${setupVars}"
|
||||
echo "BLOCKING=false" >> "${setupVars}"
|
||||
sed -i "/BLOCKING_ENABLED=/d" "${setupVars}"
|
||||
echo "BLOCKING_ENABLED=false" >> "${setupVars}"
|
||||
fi
|
||||
else
|
||||
# Enable Pi-hole
|
||||
|
@ -206,8 +206,8 @@ Time:
|
|||
if [[ -e "${blacklist}" ]]; then
|
||||
mv "${blacklist}.bck" "${blacklist}"
|
||||
fi
|
||||
sed -i "/BLOCKING=/d" "${setupVars}"
|
||||
echo "BLOCKING=true" >> "${setupVars}"
|
||||
sed -i "/BLOCKING_ENABLED=/d" "${setupVars}"
|
||||
echo "BLOCKING_ENABLED=true" >> "${setupVars}"
|
||||
fi
|
||||
|
||||
restartDNS reload
|
||||
|
@ -272,13 +272,13 @@ statusFunc() {
|
|||
|
||||
addnConfigs=$?
|
||||
|
||||
if grep -q "BLOCKING=false" /etc/pihole/setupVars.conf; then
|
||||
if grep -q "BLOCKING_ENABLED=false" /etc/pihole/setupVars.conf; then
|
||||
# A config is commented out
|
||||
case "${1}" in
|
||||
"web") echo 0;;
|
||||
*) echo -e " ${CROSS} Pi-hole blocking is Disabled";;
|
||||
esac
|
||||
elif grep -q "BLOCKING=true" /etc/pihole/setupVars.conf; then
|
||||
elif grep -q "BLOCKING_ENABLED=true" /etc/pihole/setupVars.conf; then
|
||||
# Configs are set
|
||||
case "${1}" in
|
||||
"web") echo 1;;
|
||||
|
|
Loading…
Reference in a new issue