diff --git a/README.md b/README.md index 6bdf5f1..5d5aeb2 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,35 @@ # dns failover a project written in go by db123 to check the iran server availability and if there was any problem change the bind9 dns config contents. + +## help + +```bash +./dns-failover -h +Usage of ./dns-failover: + -active-conf string + Active zone config path (default "/etc/bind/db.active") + -domain string + Domain for HTTPS SNI/Host + -fail-interval duration + Interval during failure detection (default 10s) + -failover-conf string + Failover zone config (default "/etc/bind/db.failover") + -https + Use HTTPS + -interval duration + Normal check interval (default 2m0s) + -ip string + Static IP to check + -port string + Port to check (default "80") + -primary-conf string + Primary zone config (default "/etc/bind/db.primary") + -retries int + Consecutive retries before state change (default 5) + -timeout duration + HTTP timeout (default 5s) + -url string + Health endpoint path (default "/nginx-health") + -v Verbose logging +``` diff --git a/dns-failover.service b/dns-failover.service index 2efb97b..344087e 100644 --- a/dns-failover.service +++ b/dns-failover.service @@ -3,7 +3,7 @@ Description=DNS Failover Watchdog by db123 After=network.target [Service] -ExecStart=/usr/local/bin/dns-failover -ip -v +ExecStart=/root/infra/dns-failover/dns-failover -ip Restart=always RestartSec=5 User=root