fix exit code
This commit is contained in:
parent
8552980582
commit
5e18782159
|
@ -45,7 +45,7 @@ RESOLVED_IP=$(dig +short @$DNS_SERVER $DOMAIN | head -n 1)
|
|||
|
||||
if [ "$CURRENT_IP" == "$RESOLVED_IP" ]; then
|
||||
echo "OK - $DOMAIN resolves to $CURRENT_IP"
|
||||
exit 1
|
||||
exit 0
|
||||
else
|
||||
echo "CRITICAL - $DOMAIN does not resolve to $CURRENT_IP. Resolved: $RESOLVED_IP"
|
||||
exit 2
|
||||
|
|
|
@ -62,7 +62,7 @@ fi
|
|||
|
||||
if [ "$a_record" == "$public_ip" ]; then
|
||||
echo "OK - $domain resolves to $public_ip"
|
||||
exit 1
|
||||
exit 0
|
||||
else
|
||||
echo "CRITICAL - $domain does not resolve to $public_ip. A Record: $a_record"
|
||||
exit 2
|
||||
|
|
Loading…
Reference in New Issue