diff options
author | Erich Eckner <git@eckner.net> | 2018-04-09 11:23:31 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-04-09 11:23:31 +0200 |
commit | 507b4d7efce270ae59302804f2ea0b2759fb6ec5 (patch) | |
tree | e8998dff4c6989b867a7c2bd4be5d6ee98717e95 | |
parent | b98d5cc45a9053f42c44cdcebab84888b6bfd7d9 (diff) | |
download | crypt-expiry-check-507b4d7efce270ae59302804f2ea0b2759fb6ec5.tar.xz |
crypt-expiry-check.in: allow spaces in "host"
-rwxr-xr-x | crypt-expiry-check.in | 4 |
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++ )) |