From f84ac3e0938359486d5382ca41b92202ab9b6552 Mon Sep 17 00:00:00 2001 From: Elyrith Date: Tue, 20 Aug 2013 17:26:52 -0400 Subject: [PATCH] Ubuntu whois broke .com checks. This fixes it by searching for a different string. --- check_domain | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_domain b/check_domain index 4d3064b..7fe9a5f 100755 --- a/check_domain +++ b/check_domain @@ -110,7 +110,7 @@ out=$($whois $domain) # Calculate days until expiration case "$domain" in *.com) - expiration=$(echo "$out" | awk -F: '/Expiration Date:/{print substr($0, length($1) + 2)}') + expiration=$(echo "$out" | awk -F: '/Registrar Expiration Date:/{print substr($0, length($1) + 2)}') ;; *.ru) expiration=$(echo "$out" | awk '/paid-till:/{split($2, a, "."); printf("%s-%s-%s\n", a[1], a[2], a[3])}')