fix exit code

This commit is contained in:
Cyberes 2024-02-28 14:16:33 -07:00
parent 8552980582
commit 5e18782159
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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