Created
January 29, 2016 14:18
-
-
Save ZaphodB/a16068e99a39d0f8098e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
S=`/usr/bin/pdns_control show security-status` | |
if [ "$S" == "0" ] | |
then | |
echo "NXDOMAIN or resolution failure for security-status" | |
exit 3 | |
elif [ "$S" == "1" ] | |
then | |
echo "OK security-status received" | |
exit 0 | |
elif [ "$S" == "2" ] | |
then | |
echo "Upgrade recommended for security reasons, see PowerDNS Website for more information" | |
exit 1 | |
elif [ "$S" == "3" ] | |
then | |
echo "Upgrade mandatory for security reasons, see PowerDNS Website for more information" | |
exit 2 | |
else | |
echo "unknown response from pdns_control show security-status" | |
exit 3 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment