changed the service of systemd file a bit and added the help flag output as help to readme
This commit is contained in:
32
README.md
32
README.md
@@ -1,3 +1,35 @@
|
|||||||
# dns failover
|
# 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.
|
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
|
||||||
|
```
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ Description=DNS Failover Watchdog by db123
|
|||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/local/bin/dns-failover -ip <ip> -v
|
ExecStart=/root/infra/dns-failover/dns-failover -ip <server-to-watch>
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=5
|
RestartSec=5
|
||||||
User=root
|
User=root
|
||||||
|
|||||||
Reference in New Issue
Block a user