Skip to content

Commit

Permalink
Merge pull request #180 from vedetta-com/wip
Browse files Browse the repository at this point in the history
Update ifstated.conf.mercury
- use IPv4 first
  • Loading branch information
horia authored Jul 22, 2019
2 parents 8caa620 + 07eb4ab commit ba167a3
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/etc/ifstated.conf.mercury
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ inet_mercury = '( "(ping -q -c 1 -w 10 203.0.113.1 > /dev/null && \
dns_mercury = '( "(host -4Ts -W 10 -t a mercury.example.com dot.example.com > /dev/null && \
host -6Ts -W 10 -t a mercury.example.com dot.example.com > /dev/null)" every 70 )'

https_mercury = '( "(ftp -6MVo - -w 10 https://mercury.example.com > /dev/null && \
ftp -4MVo - -w 10 https://mercury.example.com > /dev/null)" every 70 )'
https_mercury = '( "(ftp -4MVo - -w 10 https://mercury.example.com > /dev/null && \
ftp -6MVo - -w 10 https://mercury.example.com > /dev/null)" every 70 )'

smtps_mercury = '( "(nc -6czw 10 mercury.example.com 465 > /dev/null && \
nc -4czw 10 mercury.example.com 465 /dev/null)" every 70 )'
smtps_mercury = '( "(nc -4czw 10 mercury.example.com 465 > /dev/null && \
nc -6czw 10 mercury.example.com 465 /dev/null)" every 70 )'

# State Definitions

Expand Down Expand Up @@ -63,8 +63,6 @@ state dns {
init {
run "logger -t ifstated '(dns)'"
}

# https
if ! $https_mercury {
run "logger -t ifstated '(https_mercury) down'"
run "echo down | mail -r ifstated@example.com -s 'ifstated (https_mercury)' root"
Expand All @@ -76,8 +74,6 @@ state dns {
run "logger -t ifstated '(https_mercury) up'"
run "echo up | mail -r ifstated@example.com -s 'ifstated (https_mercury)' root"
}

# smtps
if ! $smtps_mercury {
run "logger -t ifstated '(smtps_mercury) down'"
run "echo down | mail -r ifstated@example.com -s 'ifstated (smtps_mercury)' root"
Expand Down

0 comments on commit ba167a3

Please sign in to comment.