summaryrefslogtreecommitdiff
path: root/certexpiry.sh
diff options
context:
space:
mode:
Diffstat (limited to 'certexpiry.sh')
-rwxr-xr-xcertexpiry.sh9
1 files changed, 3 insertions, 6 deletions
diff --git a/certexpiry.sh b/certexpiry.sh
index 90c5fd6..ea2feeb 100755
--- a/certexpiry.sh
+++ b/certexpiry.sh
@@ -5,14 +5,11 @@ set -euo pipefail
# Output warning if fewer than this number of seconds until expiry
WARNSECONDS=1209600 # Two weeks
# Bash array of host:port combinations to be checked
-HOSTSANDPORTS=(irc.tghost.co.uk:6697 irc.lc8n.com:6697 irc.pgburton.com:6697 www.tghost.co.uk mail.tghost.co.uk:25 \
- mail.tghost.co.uk:143 mail.tghost.co.uk mumble.tghost.co.uk:64738 bladns.net www.lc8n.com \
- www.blatech.net upload.bratch.co.uk www.nokiaplan3.com davmail.tghost.co.uk:1143 bcal.tghost.co.uk \
- www.blaupload.co.uk up.org.je)
+HOSTSANDPORTS="hostsandports.txt"
# ==== Variables ====
# Loop through all host:port combinations
-for HOSTANDPORT in "${HOSTSANDPORTS[@]}" ; do
+while read HOSTANDPORT ; do
# echo "DEBUG: HOSTANDPORT: $HOSTANDPORT."
@@ -72,4 +69,4 @@ for HOSTANDPORT in "${HOSTSANDPORTS[@]}" ; do
# echo "DEBUG: The certificate at $HOST:$PORT expires in $DIFFERENCE seconds (~$(expr $DIFFERENCE / 60 / 60 / 24) days)."
fi
-done
+done < "$HOSTSANDPORTS"