From 507b4d7efce270ae59302804f2ea0b2759fb6ec5 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 9 Apr 2018 11:23:31 +0200 Subject: crypt-expiry-check.in: allow spaces in "host" --- crypt-expiry-check.in | 4 ++-- 1 file 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++ )) -- cgit v1.2.3-70-g09d2