mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
Move wildcards file if blocking is disabled (#1495)
* Move wildcards file if blocking is diabled * Delete newline
This commit is contained in:
parent
10139241f5
commit
d913534793
1 changed files with 7 additions and 1 deletions
6
pihole
6
pihole
|
@ -176,6 +176,9 @@ Time:
|
||||||
elif [[ "${1}" == "0" ]]; then
|
elif [[ "${1}" == "0" ]]; then
|
||||||
# Disable Pi-hole
|
# Disable Pi-hole
|
||||||
sed -i 's/^addn-hosts=\/etc\/pihole\/gravity.list/#addn-hosts=\/etc\/pihole\/gravity.list/' /etc/dnsmasq.d/01-pihole.conf
|
sed -i 's/^addn-hosts=\/etc\/pihole\/gravity.list/#addn-hosts=\/etc\/pihole\/gravity.list/' /etc/dnsmasq.d/01-pihole.conf
|
||||||
|
if [[ -e "$wildcardlist" ]]; then
|
||||||
|
mv "$wildcardlist" "/etc/pihole/wildcard.list"
|
||||||
|
fi
|
||||||
echo "::: Blocking has been disabled!"
|
echo "::: Blocking has been disabled!"
|
||||||
if [[ $# > 1 ]]; then
|
if [[ $# > 1 ]]; then
|
||||||
if [[ "${2}" == *"s"* ]]; then
|
if [[ "${2}" == *"s"* ]]; then
|
||||||
|
@ -199,6 +202,9 @@ Time:
|
||||||
# Enable Pi-hole
|
# Enable Pi-hole
|
||||||
echo "::: Blocking has been enabled!"
|
echo "::: Blocking has been enabled!"
|
||||||
sed -i 's/^#addn-hosts/addn-hosts/' /etc/dnsmasq.d/01-pihole.conf
|
sed -i 's/^#addn-hosts/addn-hosts/' /etc/dnsmasq.d/01-pihole.conf
|
||||||
|
if [[ -e "/etc/pihole/wildcard.list" ]]; then
|
||||||
|
mv "/etc/pihole/wildcard.list" "$wildcardlist"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
restartDNS
|
restartDNS
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue