From 2c1b78a1c63bb186773c5c6527341eef570ad932 Mon Sep 17 00:00:00 2001 From: Jack-Benny Persson Date: Thu, 26 Jun 2014 20:15:02 +0200 Subject: [PATCH 1/2] Added support for .org TLD and updated 'Currently supports'-line --- check_domain | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/check_domain b/check_domain index 7202bc6..51b4e48 100755 --- a/check_domain +++ b/check_domain @@ -88,7 +88,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 +Currently supports .com, .ca, .tv, .ee, .ru, .nu .se, .net, .org EOF } @@ -146,6 +146,9 @@ case "$domain" in ;; *.net) expiration=$(echo "$out" | awk -F: '/ Expiration Date:/{print substr($0, length($1) + 3, 11)}') + ;; +*.org) + expiration=$(echo "$out" | awk -F: '/ Expiry Date:/{print substr($0, length($1) + 3, 10)}') ;; *.nu) expiration=$(echo "$out" | grep expires | awk '{print $2}') From 9bba50e20b17431e07d0bfb8963cc576b2ca20fd Mon Sep 17 00:00:00 2001 From: Jack-Benny Persson Date: Thu, 26 Jun 2014 20:19:19 +0200 Subject: [PATCH 2/2] Updated readme to reflect support for .org TLD --- readme | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/readme b/readme index efe40ca..faa392b 100644 --- a/readme +++ b/readme @@ -10,14 +10,17 @@ Ryan found it hosted at: http://git.pld-linux.org/gitweb.cgi/?p=packages/nagios-plugin-check_domain.git This is a fork, hosted at https://github.com/Elyrith/check_domain -Currently supports .com, .ca, .tv, .ee, .ru, .net, .nu, .se +Currently supports .com, .ca, .tv, .ee, .ru, .net, .nu, .se, .org Support for .ca and .se by Ryan Loudfoot (elyrith@gmail.com) -Support for .net and .nu by Jack-Benny Persson (jack-benny@cyberinfo.se) +Support for .net, .nu and .org by Jack-Benny Persson (jack-benny@cyberinfo.se) Support for Performance Data by Ryan Loudfoot If you would like to add a TLD, send me the code or a pull request. If you want me to add one, let me know and I'll see what I can do. Change log: +2014-06-26 - Version 0.99 +-Add support for .org domains thanks to Jack-Benny Persson (jack-benny@cyberinfo.se) + 2014-02-21 - Version 0.98 -Fix support for .ca domains, not sure why it broke but it's fixed now. -Fix spacing in comment for utils.sh