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.bck and black.list.bck instead of
# gravity.list and black.list # gravity.list and black.list
detect_pihole_blocking_status() { detect_pihole_blocking_status() {
if [[ "${BLOCKING}" == false ]]; then if [[ "${BLOCKING_ENABLED}" == false ]]; then
echo -e " ${INFO} Pi-hole blocking is disabled" echo -e " ${INFO} Pi-hole blocking is disabled"
adList="${adList}.bck" adList="${adList}.bck"
blackList="${blackList}.bck" blackList="${blackList}.bck"

@ -192,8 +192,8 @@ Time:
fi fi
local str="Pi-hole Disabled" local str="Pi-hole Disabled"
sed -i "/BLOCKING=/d" "${setupVars}" sed -i "/BLOCKING_ENABLED=/d" "${setupVars}"
echo "BLOCKING=false" >> "${setupVars}" echo "BLOCKING_ENABLED=false" >> "${setupVars}"
fi fi
else else
# Enable Pi-hole # Enable Pi-hole
@ -206,8 +206,8 @@ Time:
if [[ -e "${blacklist}" ]]; then if [[ -e "${blacklist}" ]]; then
mv "${blacklist}.bck" "${blacklist}" mv "${blacklist}.bck" "${blacklist}"
fi fi
sed -i "/BLOCKING=/d" "${setupVars}" sed -i "/BLOCKING_ENABLED=/d" "${setupVars}"
echo "BLOCKING=true" >> "${setupVars}" echo "BLOCKING_ENABLED=true" >> "${setupVars}"
fi fi
restartDNS reload restartDNS reload
@ -272,13 +272,13 @@ statusFunc() {
addnConfigs=$? 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 # A config is commented out
case "${1}" in case "${1}" in
"web") echo 0;; "web") echo 0;;
*) echo -e " ${CROSS} Pi-hole blocking is Disabled";; *) echo -e " ${CROSS} Pi-hole blocking is Disabled";;
esac 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 # Configs are set
case "${1}" in case "${1}" in
"web") echo 1;; "web") echo 1;;

Loading…
Cancel
Save