3 ms·
I like that physical button solution. Do you have a github repo or blog post documenting how you did it anywhere?
by rablackburn 6y ago
I like that physical button solution. Do you have a github repo or blog post documenting how you did it anywhere?
- ObsoleteNerd 6y agoI 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 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-pi-gpio/ 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 https://github.com/nickearl/piHoleButtons