Compare commits
No commits in common. "46fbb634895b0d960897c11595d63d264c3a5f33" and "35392f97dc95ebd58c553496ae25b761d6408f33" have entirely different histories.
46fbb63489
...
35392f97dc
|
@ -1 +0,0 @@
|
||||||
*.log
|
|
|
@ -1,25 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
TIMEOUT=2
|
|
||||||
|
|
||||||
function no_good {
|
|
||||||
cd /home/kkenny/src/docker/pihole
|
|
||||||
git pull
|
|
||||||
echo "[$(date)] $1 has failed, restarting." >> health.log
|
|
||||||
docker compose down >> health.log 2>&1
|
|
||||||
docker compose up $1 -d >> health.log 2>&1
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
case $(hostname) in
|
|
||||||
pi501)
|
|
||||||
dig google.com @10.200.53.241 >/dev/null 2>&1 || no_good "pihole1"
|
|
||||||
;;
|
|
||||||
pi502)
|
|
||||||
dig google.com @10.200.53.242 >/dev/null 2>&1 || no_good "pihole2"
|
|
||||||
;;
|
|
||||||
pi503)
|
|
||||||
dig google.com @10.200.53.243 >/dev/null 2>&1 || no_good "pihole3"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
Loading…
Reference in New Issue