diff --git a/nagios/check_whois b/nagios/check_whois index 8f08e46..dc6ef2e 100755 --- a/nagios/check_whois +++ b/nagios/check_whois @@ -100,12 +100,18 @@ extract_date_from_whois() { # 2 - coca-cola.com (we try to ignore lines starting with space...) # 3 - facebook.com (...but if there's nothing else, take it anyway) # 4 - some databases with simple display (.se, .si) + # 5 - .it + # 6 - .ru + # 7 - .jp # Add your own filter here :) EXPIRATION_DATE="$( sed -n \ -e 's/^Registry Expiry Date: //p' \ - -e '/^[^[:space:]]/s/.*\(xpiry\|xpiration\) Date: //p' \ - -e 's/.*\(xpiry\|xpiration\) Date: //p' \ + -e '/^[^[:space:]]/s/.*\(xpiry\|xpiration\) Date:[[:space:]]\+//p' \ + -e 's/.*\(xpiry\|xpiration\) Date:[[:space:]]\+//p' \ -e 's/^expires\?:[[:space:]]*//p' \ + -e 's/^Expire Date:[[:space:]]*//p' \ + -e 's/^paid-till:[[:space:]]*//p' \ + -e 's/^\[Expires on\][[:space:]]*//p' \ | sed 'q' )"