This assumes you’re running Android. Install Raspberry SSH Lite from the Android market and add/create these two scripts to any directory of choice on your RPi (don’t forget to
chmod +x). I put them in
In Raspberry SSH Lite add a button with the command
sh /root/en-pihole.sh plus your SSH credentials. Save, then clone that button but point it to
sh /root/dis-pihole.sh. That’s it. Pressing Disable will rename your
pihole.conf file to
.bak, effectively disabling ad-blocking. Enabling will reverse this.
Some caveats: I’m running these under root. Using
sudo with a less privileged account is always a better choice. Also, this could be done with a single script but I’m lazy.