'check_twodns.sh' ändern
This commit is contained in:
@@ -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
|
||||||
Reference in New Issue
Block a user