Last active
April 5, 2016 10:09
-
-
Save digiltd/4b6f6a546abc2fdb131d30a359dd732a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Script to toggle ad-blocking on/off. Save in /usr/local/bin | |
# Source https://pi-hole.net/forums/topic/quickly-enabledisable-pi-hole-from-your-phone/ | |
# Toggle with $ pihole-toggle.sh | |
list=/etc/pihole/gravity.list | |
if [[ -f $list ]];then | |
mv $list $list.off | |
systemctl restart dnsmasq | |
echo "Ad-blocking disabled" | |
else | |
mv $list.off $list | |
systemctl restart dnsmasq | |
echo "Ad-blocking enabled" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment