Skip to content

Instantly share code, notes, and snippets.

@g3rhard
Created May 5, 2020 18:00
Show Gist options
  • Save g3rhard/42703e7c5bfe314d973de17d559d609f to your computer and use it in GitHub Desktop.
Save g3rhard/42703e7c5bfe314d973de17d559d609f to your computer and use it in GitHub Desktop.
## Monitor Pi-Hole service
check process pihole-FTL with pidfile /var/run/pihole-FTL.pid
start program = "/etc/init.d/pihole-FTL start"
stop program = "/etc/init.d/pihole-FTL stop"
if changed pid then exec "/bin/bash -c '/usr/local/bin/slack-webhook.rb'"
if 1 restart within 1 cycle then exec "/bin/bash -c '/usr/local/bin/slack-webhook.rb'"
if failed port 53 type tcp with timeout 5 seconds for 2 cycles then restart
## Check Pi-Hole web interface
check process lighttpd with pidfile /var/run/lighttpd.pid
start program = "/etc/init.d/lighttpd start"
stop program = "/etc/init.d/lighttpd stop"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment