[packages/nagios-plugin-check_domain] fix cnn.com fetch

glen glen at pld-linux.org
Mon Dec 16 10:27:43 CET 2013


commit e2e4d279e4daf994477eb0963e12ab6aa3c84e10
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon Dec 16 11:26:36 2013 +0200

    fix cnn.com fetch

 check_domain.sh | 3 ++-
 test.sh         | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/check_domain.sh b/check_domain.sh
index 679a0ad..c3e7b51 100755
--- a/check_domain.sh
+++ b/check_domain.sh
@@ -158,7 +158,8 @@ case "$domain" in
 	expiration="$1-$2-$3"
 	;;
 *)
-	expiration=$(echo "$out" | awk -F: '/Expiration Date:/{print substr($0, length($1) + 2)}')
+	# Expiration Date: 21-sep-2018
+	expiration=$(echo "$out" | awk -F: '/Expiration Date:/{print substr($0, length($1) + 2); exit}')
 	;;
 esac
 
diff --git a/test.sh b/test.sh
index 734c153..06198fc 100755
--- a/test.sh
+++ b/test.sh
@@ -19,6 +19,7 @@ amazon.ie
 amazon.co.uk
 dk-hostmaster.dk
 bbk.ac.uk
+cnn.com
 "
 
 for domain in ${*:-$domains}; do
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list