Skip to content

Instantly share code, notes, and snippets.

@gnormandin
gnormandin / pihole.sh
Created September 27, 2020 21:48 — forked from EinPinsel/pihole.sh
PiHole HA Setup
#!/bin/bash -x
# README
:'
Credit to redditor /u/jvinch76 https://www.reddit.com/user/jvinch76 for creating the basis for this modification.
I had been thinking of a script like his to keep my primary and secondary pihole raspberry pis in sync, but could not find the motivation to create it.
/u/jvinch76 did the heavy lifting and I made changes I hope you find useful.
I modified the code to increase the frequency of the sync to every 5 minutes and reduce the file writes by using rsync to compare the files and only transfer changes.
Furthermore, gravity will be updated and services restarted only if files are modified and a sync occurs.

Keybase proof

I hereby claim:

  • I am gnormandin on github.
  • I am codingpanic (https://keybase.io/codingpanic) on keybase.
  • I have a public key ASAlwRpgI_Hh4Udo9fwoUynXr157_H-EKJHIj9hJxaeXtwo

To claim this, I am signing this object: