]> git.pld-linux.org Git - packages/nagios-plugin-check_domain.git/commitdiff
v1.2.4: added .dk support, thanks Troels Hansen!
authorElan Ruusamäe <glen@delfi.ee>
Tue, 24 Sep 2013 14:45:11 +0000 (17:45 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Tue, 24 Sep 2013 14:45:11 +0000 (17:45 +0300)
check_domain.sh
test.sh

index cfb439347b1a87278f583c82522eb133ebf09597..841eb21eb160c6f69dbb84794a90ad3da3f2d2ce 100755 (executable)
@@ -33,7 +33,7 @@ die() {
 
 fullusage() {
        cat <<EOF
-check_domain - v1.2.3
+check_domain - v1.2.4
 Copyright (c) 2005 Tomàs Núñez Lirola <tnunez@criptos.com>, 2009-2013 Elan Ruusamäe <glen@pld-linux.org>
 under GPL License
 
@@ -131,6 +131,10 @@ case "$domain" in
        set -- "$1" "$(month2moy $2)" "$3"
        expiration="$1-$2-$3"
        ;;
+*.dk)
+       # Expires: 2014-01-31
+       expiration=$(echo "$out" | awk '/Expires:/ {print $2}')
+       ;;
 *.uk)
        # Expiry date:  05-Dec-2014
        set -- $(echo "$out" | awk '/Expiry date:/{split($3, a, "-"); printf("%s %s %s\n", a[3], a[2], a[1])}')
diff --git a/test.sh b/test.sh
index 3179311b19a4de3fe40e7672928247d5886bc56d..4e72b38db3faa76262912c2bcb8df45cd777f085 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -17,6 +17,7 @@ delfi.tv
 amazon.ca
 amazon.ie
 amazon.co.uk
+dk-hostmaster.dk
 "
 
 for domain in $domains; do
This page took 0.081255 seconds and 4 git commands to generate.