This is an old revision of the document!
Syncing Two Pi-Holes with Bash Scripting
Since gravity sync current has some issues, I wrote a simple script to copy over your key files
You can automate this with cron if you like, but I like to run it manually after any dns updates
#!/bin/bash cat banner.txt sshpass -f '/home/warmachine/dnsreppw/pw' scp /etc/dnsmasq.d/05-custom.conf warmachine@192.168.1.30:/etc/dnsmasq.d/05-custom.conf sshpass -f '/home/warmachine/dnsreppw/pw' scp /etc/dnsmasq.d/05-pihole-custom-cname.conf warmachine@192.168.1.30:/etc/dnsmasq.d/05-pihole-custom-cname.conf sshpass -f '/home/warmachine/dnsreppw/pw' ssh warmachine@192.168.1.30 'sudo systemctl restart pihole-FTL.service' echo "." echo "." echo "." echo "." echo "." echo "." echo "." echo "." cat banner2.txt
banner.text
▓█████▄ ███▄ █ ██████ █ ██ ██▓███ ▓█████▄ ▄▄▄ ▄▄▄█████▓▓█████ ██▀███ ▒██▀ ██▌ ██ ▀█ █ ▒██ ▒ ██ ▓██▒▓██░ ██▒▒██▀ ██▌▒████▄ ▓ ██▒ ▓▒▓█ ▀ ▓██ ▒ ██▒ ░██ █▌▓██ ▀█ ██▒░ ▓██▄ ▓██ ▒██░▓██░ ██▓▒░██ █▌▒██ ▀█▄ ▒ ▓██░ ▒░▒███ ▓██ ░▄█ ▒ ░▓█▄ ▌▓██▒ ▐▌██▒ ▒ ██▒ ▓▓█ ░██░▒██▄█▓▒ ▒░▓█▄ ▌░██▄▄▄▄██░ ▓██▓ ░ ▒▓█ ▄ ▒██▀▀█▄ ░▒████▓ ▒██░ ▓██░▒██████▒▒ ▒▒█████▓ ▒██▒ ░ ░░▒████▓ ▓█ ▓██▒ ▒██▒ ░ ░▒████▒░██▓ ▒██▒ ▒▒▓ ▒ ░ ▒░ ▒ ▒ ▒ ▒▓▒ ▒ ░ ░▒▓▒ ▒ ▒ ▒▓▒░ ░ ░ ▒▒▓ ▒ ▒▒ ▓▒█░ ▒ ░░ ░░ ▒░ ░░ ▒▓ ░▒▓░ ░ ▒ ▒ ░ ░░ ░ ▒░░ ░▒ ░ ░ ░░▒░ ░ ░ ░▒ ░ ░ ▒ ▒ ▒ ▒▒ ░ ░ ░ ░ ░ ░▒ ░ ▒░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░░░ ░ ░ ░░ ░ ░ ░ ░ ▒ ░ ░ ░░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
banner2.text
___ _ _ ____ _ _ ___ ___ ____ ___ ____ ___ ____ ____ _ _ | \ |\ | [__ | | |__] | \ |__| | |___ | \ |___ |__| |\/| |__/ | \| ___] |__| | |__/ | | | |___ |__/ | | | | |
Last modified: le 2022/01/22 00:24

Discussion