tmp result file fpr debugging

This commit is contained in:
olli 2024-02-05 14:31:24 +01:00
parent e4bc26c597
commit b20dac3b2c

View File

@ -197,19 +197,20 @@
fi fi
done done
grep Host /home/docker/traefik/providers/*.yml >>$g_tmp/hosts grep Host /home/docker/traefik/providers/*.yml >>$g_tmp/hosts
resultfile="/tmp/ssllabs-scan-result-$$-$host"
cat $g_tmp/hosts | cut -d '`' -f2 | sort -u | while read host cat $g_tmp/hosts | cut -d '`' -f2 | sort -u | while read host
do do
host ${host} >/dev/null 2>&1 || continue host ${host} >/dev/null 2>&1 || continue
curl -s https://${host} >/dev/null 2>&1 || continue curl -s https://${host} >/dev/null 2>&1 || continue
while cat /tmp/ssllabs-scan-result-$host | jq -r | egrep -q '^\[\]$' while cat $resultfile | jq -r | egrep -q '^\[\]$'
do do
until ssllabs-scan --quiet ${host} >/tmp/ssllabs-scan-result-$host until ssllabs-scan --quiet ${host} >$resultfile
do do
sleep 60 sleep 60
done done
sleep 60 sleep 60
done done
cat /tmp/ssllabs-scan-result-$host | jq '.[] | .endpoints | .[] | .grade' >${g_tmp}/ssllabs-scan-result 2>&1 >${g_tmp}/ssllabs-scan-result cat $resultfile | jq '.[] | .endpoints | .[] | .grade' >${g_tmp}/ssllabs-scan-result 2>&1 >${g_tmp}/ssllabs-scan-result
if ! egrep -q 'A+|null' ${g_tmp}/ssllabs-scan-result if ! egrep -q 'A+|null' ${g_tmp}/ssllabs-scan-result
then then
#if ! grep -q T ${g_tmp}/ssllabs-scan-result #if ! grep -q T ${g_tmp}/ssllabs-scan-result