From e24bf8aa601f066499ef76dfd57adafa78d7bfcd Mon Sep 17 00:00:00 2001 From: Zachary Vance Date: Wed, 20 Apr 2016 23:53:13 -0700 Subject: [PATCH] separate tests --- cgi-bin/service.status.d/ddns | 3 +++ cgi-bin/service.status.d/ddns.za3k.com | 5 ----- 2 files changed, 3 insertions(+), 5 deletions(-) create mode 100644 cgi-bin/service.status.d/ddns diff --git a/cgi-bin/service.status.d/ddns b/cgi-bin/service.status.d/ddns new file mode 100644 index 0000000..226f792 --- /dev/null +++ b/cgi-bin/service.status.d/ddns @@ -0,0 +1,3 @@ +IP="$(curl -q icanhazip.com 2>/dev/null)" +host deadtree.moreorcs.com ns.za3k.com | grep "has" +host deadtree.moreorcs.com ns.za3k.com | grep "has" | grep "${IP}" >/dev/null diff --git a/cgi-bin/service.status.d/ddns.za3k.com b/cgi-bin/service.status.d/ddns.za3k.com index a2db139..2a717a8 100644 --- a/cgi-bin/service.status.d/ddns.za3k.com +++ b/cgi-bin/service.status.d/ddns.za3k.com @@ -2,8 +2,3 @@ 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" -- 2.47.3