[packages/nagios-plugin-check_domain] v1.2.7: add .org domain validation

glen glen at pld-linux.org
Thu Jan 23 09:32:30 CET 2014


commit 310f50b6372d30d49b8ef72c2d80465c7d86fee3
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Jan 23 10:31:28 2014 +0200

    v1.2.7: add .org domain validation

 check_domain.sh | 9 +++++----
 test.sh         | 1 +
 2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/check_domain.sh b/check_domain.sh
index 4d26ba7..bf6c6c4 100755
--- a/check_domain.sh
+++ b/check_domain.sh
@@ -2,7 +2,7 @@
 # Nagios plugin for checking a domain name expiration date
 #
 # Copyright (c) 2005 Tomàs Núñez Lirola <tnunez at criptos.com>,
-# 2009-2013 Elan Ruusamäe <glen at pld-linux.org>
+# 2009-2014 Elan Ruusamäe <glen at pld-linux.org>
 #
 # Licensed under GPL v2 License
 # URL: http://git.pld-linux.org/?p=packages/nagios-plugin-check_domain.git;a=summary
@@ -33,8 +33,8 @@ die() {
 
 fullusage() {
 	cat <<EOF
-check_domain - v1.2.6
-Copyright (c) 2005 Tomàs Núñez Lirola <tnunez at criptos.com>, 2009-2013 Elan Ruusamäe <glen at pld-linux.org>
+check_domain - v1.2.7
+Copyright (c) 2005 Tomàs Núñez Lirola <tnunez at criptos.com>, 2009-2014 Elan Ruusamäe <glen at pld-linux.org>
 under GPL License
 
 This plugin checks the expiration date of a domain name.
@@ -159,7 +159,8 @@ case "$domain" in
 	;;
 *)
 	# Expiration Date: 21-sep-2018
-	expiration=$(echo "$out" | awk -F: '/Expiration Date:/{print substr($0, length($1) + 2); exit}')
+	# Registry Expiry Date: 2015-08-03T04:00:00Z
+	expiration=$(echo "$out" | awk -F: '/Expir(ation|y) Date:/{print substr($0, length($1) + 2); exit}')
 	;;
 esac
 
diff --git a/test.sh b/test.sh
index 06198fc..b2ecf0c 100755
--- a/test.sh
+++ b/test.sh
@@ -20,6 +20,7 @@ amazon.co.uk
 dk-hostmaster.dk
 bbk.ac.uk
 cnn.com
+gimp.org
 "
 
 for domain in ${*:-$domains}; do
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nagios-plugin-check_domain.git/commitdiff/310f50b6372d30d49b8ef72c2d80465c7d86fee3



More information about the pld-cvs-commit mailing list