diff --git a/check_domain b/check_domain index e191de3..1298ef5 100755 --- a/check_domain +++ b/check_domain @@ -23,7 +23,7 @@ # https://github.com/Elyrith/check_domain # ############################################################################### -# VERSION: Version 1.1 +# VERSION: Version 1.2.2 # AUTHOR: See README. This version updated by Ryan Loudfoot (ryan@delotha.com) PROGRAM=$(whereis -b -B /{bin,sbin,usr,etc} /{bin,sbin,usr,etc}/* -f whois | awk '{print $2}') @@ -148,9 +148,12 @@ case "$domain" in *.se) expiration=$(echo "$out" | awk '/expires:/{split($2, a, "-"); printf("%s-%s-%s\n", a[1], a[2], a[3])}') ;; +*.cloud) + expiration=$(echo "$out" | awk '/Registry Expiry Date: /{split($4, a, "-"); printf("%d-%02d-%02d\n", a[1], a[2], a[3])}') + ;; *.net) expiration=$(echo "$out" | awk '/Registry Expiry Date: /{split($4, a, "-"); printf("%d-%02d-%02d\n", a[1], a[2], a[3])}') - ;; + ;; *.org) expiration=$(echo "$out" | awk -F: '/ Expiry Date:/{print substr($0, length($1) + 3, 10)}') ;; diff --git a/readme b/readme index 15629ac..86d3d87 100644 --- a/readme +++ b/readme @@ -1,3 +1,5 @@ +UPDATE 2024-04-26: Added support for .cloud (same as .net). Bumped version 1.2.2. /Jack-Benny Persson. + UPDATE 2017-09-07: Updated .net and .com since they changed the whois format / Jack-Benny Persson. UPDATE 2015-03-27: I've found the original plugin (still maintained by Elan) on GitHub at https://github.com/glensc/nagios-plugin-check_domain. It has improved much more than this one so I've contributed the minor additions from this repo upstream and am going to switch to that version.