]> git.za3k.com Git - za3k.git/commitdiff
Add ddns.za3k.com test
authorZachary Vance <za3k@za3k.com>
Thu, 21 Apr 2016 06:51:50 +0000 (23:51 -0700)
committerZachary Vance <za3k@za3k.com>
Thu, 21 Apr 2016 06:51:50 +0000 (23:51 -0700)
cgi-bin/service.status.d/ddns.za3k.com [new file with mode: 0644]

diff --git a/cgi-bin/service.status.d/ddns.za3k.com b/cgi-bin/service.status.d/ddns.za3k.com
new file mode 100644 (file)
index 0000000..a2db139
--- /dev/null
@@ -0,0 +1,9 @@
+ALL=$(curl -iLs https://ddns.za3k.com)
+HEADER=$(echo "$ALL" | head -1)
+echo "${ALL}" | grep -q "404 Not Found" >/dev/null || exit 1
+echo "${ALL}" | grep -q "no domain" >/dev/null || exit 1
+echo "ddns.za3k.com is up"
+
+IP="$(curl -q icanhazip.com 2>/dev/null)"
+host deadtree.moreorcs.com ns.za3k.com | grep "has" | grep "${IP}" || exit 1
+echo "deadtree.moreorcs.com == this ip"