From c7710446db5f0a769990b7317a918c099dc86276 Mon Sep 17 00:00:00 2001 From: Tomas Lastovicka Date: Sun, 15 Mar 2015 21:11:53 +0100 Subject: [PATCH] Added support for .cz and .sk TLDs --- check_domain | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/check_domain b/check_domain index 72c8f62..c411418 100755 --- a/check_domain +++ b/check_domain @@ -90,7 +90,7 @@ This plugin will use whois service to get the expiration date for the domain nam Example: $PROGRAM -d domain.tld -w 30 -c 10 -Currently supports .com, .ca, .tv, .ee, .ru, .nu .se, .net, .org +Currently supports .com, .ca, .tv, .ee, .ru, .nu .se, .net, .org, .cz, .sk EOF } @@ -155,6 +155,12 @@ case "$domain" in *.nu) expiration=$(echo "$out" | grep expires | awk '{print $2}') ;; +*.cz) + expiration=$(echo "$out" | awk '/expire:/{split($2, a, "."); printf("%s-%s-%s\n", a[3], a[2], a[1])}') + ;; +*.sk) + expiration=$(echo "$out" | grep Valid-date | awk '{print $2}') + ;; *) expiration=$(echo "$out" | awk -F: '/Expiration Date:/{print substr($0, length($1) + 2)}') ;;