summaryrefslogtreecommitdiff
path: root/crypt-expiry-check.in
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-04-09 11:23:31 +0200
committerErich Eckner <git@eckner.net>2018-04-09 11:23:31 +0200
commit507b4d7efce270ae59302804f2ea0b2759fb6ec5 (patch)
treee8998dff4c6989b867a7c2bd4be5d6ee98717e95 /crypt-expiry-check.in
parentb98d5cc45a9053f42c44cdcebab84888b6bfd7d9 (diff)
downloadcrypt-expiry-check-507b4d7efce270ae59302804f2ea0b2759fb6ec5.tar.xz
crypt-expiry-check.in: allow spaces in "host"
Diffstat (limited to 'crypt-expiry-check.in')
-rwxr-xr-xcrypt-expiry-check.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypt-expiry-check.in b/crypt-expiry-check.in
index d70bb32..d70988e 100755
--- a/crypt-expiry-check.in
+++ b/crypt-expiry-check.in
@@ -605,7 +605,7 @@ done
for (( i=0; i<${#SERVERFILES[@]}; i++ ))
do
- while read HOST PORT
+ while read PORT HOST
do
if [ "${PORT}" = "FILE" ]
then
@@ -619,7 +619,7 @@ do
else
check_server_status "${HOST}" "${PORT}"
fi
- done <<< "$(egrep -v '(^#|^$)' ${SERVERFILES[${i}]})"
+ done <<< "$(sed '/^#|^$/d;s/\(.*\S\) \+\(\S\+\)/\2 \1/' ${SERVERFILES[${i}]})"
done
for (( i=0; i<${#CERTFILES[@]}; i++ ))