BLOCKING -> BLOCKING_ENABLED

Signed-off-by: DL6ER <dl6er@dl6er.de>
pull/2356/head
DL6ER 6 years ago
parent 4e4d6b5d1f
commit 337cc5ca18
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD

@ -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"

@ -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…
Cancel
Save