'check_twodns.sh' ändern

This commit is contained in:
2022-01-20 10:39:13 +01:00
parent 2f756409d9
commit 1907c6c26b

View File

@@ -18,13 +18,13 @@ if [ $# -ne 3 ]; then
fi fi
SerialMaster=$(/usr/bin/dig @${1} ${3} +short SOA | awk '{print $3}') SerialMaster=$(/usr/bin/dig @${1} ${3} +short SOA | awk '{print $3}')
if [ $? -ne 0 ]; then if [ $? -ne 0 ] || [ -z "$SerialMaster" ]; then
echo "Error reading Serial from Master for Domain \"${3}\"" echo "Error reading Serial from Master for Domain \"${3}\""
exit 3 exit 3
fi fi
SerialSlave=$(/usr/bin/dig @${2} ${3} +short SOA | awk '{print $3}') SerialSlave=$(/usr/bin/dig @${2} ${3} +short SOA | awk '{print $3}')
if [ $? -ne 0 ]; then if [ $? -ne 0 ] || [ -z "$SerialSlave" ]; then
echo "Error reading Serial from Slave for Domain \"${3}\"" echo "Error reading Serial from Slave for Domain \"${3}\""
exit 3 exit 3
fi fi
@@ -38,4 +38,4 @@ else
fi fi
echo $Status echo $Status
exit $STATE exit $STATE