Re:Ad blocking with Raspberry Pi and Pi-hole
by rablackburn on Monday May 04, 2020 @07:43PM
(#23074700)
I like that physical button solution. Do you have a github repo or blog post documenting how you did it anywhere?
[ Parent
| on HN ]
Re:Ad blocking with Raspberry Pi and Pi-hole
by ObsoleteNerd on Monday May 04, 2020 @08:29PM
(#23075004)
I haven't posted anything, but it's pretty simple really. Follow any of the guides to make a physical button run a Python/BASH script[0] and then I wrote a small script that just CURLs the URL to disable the Pi-Hole for a few minutes (eg: curl --silent http://192.168.2.2/admin/api.php?disable=600&auth=PASSWORD ).
I've been meaning to make a blog post about it but haven't got around to it yet. I'll try write something up later today/tonight.
[0] https://raspberrypihq.com/use-a-push-button-with-raspberry-p...
Edit: I found this which is a much bigger/fancier version of what I did, but has the associated code you can pull out for a simple button: https://github.com/nickearl/piHoleButtons