better SSL Check error handling
This commit is contained in:
parent
96c29a1d56
commit
91317cea13
11
traefik.yml
11
traefik.yml
@ -198,15 +198,18 @@
|
|||||||
grep Host /home/docker/traefik/providers/*.yml >>$g_tmp/hosts
|
grep Host /home/docker/traefik/providers/*.yml >>$g_tmp/hosts
|
||||||
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
|
||||||
ssllabs-scan --quiet ${host} | jq '.[] | .endpoints | .[] | .grade' >${g_tmp}/ssllabs-scan-result
|
until ssllabs-scan --quiet ${host} | jq '.[] | .endpoints | .[] | .grade' >${g_tmp}/ssllabs-scan-result 2>&1
|
||||||
|
do
|
||||||
|
sleep 60
|
||||||
|
done
|
||||||
if ! grep -q 'A+' ${g_tmp}/ssllabs-scan-result
|
if ! grep -q 'A+' ${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
|
||||||
then
|
#then
|
||||||
g_echo_error "Qualys SSL Labs scan-result for ${host} not A+: $(cat ${g_tmp}/ssllabs-scan-result)
|
g_echo_error "Qualys SSL Labs scan-result for ${host} not A+: $(cat ${g_tmp}/ssllabs-scan-result)
|
||||||
|
|
||||||
https://www.ssllabs.com/ssltest/analyze.html?d=${host}&hideResults=on"
|
https://www.ssllabs.com/ssltest/analyze.html?d=${host}&hideResults=on"
|
||||||
fi
|
#fi
|
||||||
else
|
else
|
||||||
g_echo_ok "Qualys SSL Labs scan-result for ${host}: $(cat ${g_tmp}/ssllabs-scan-result)"
|
g_echo_ok "Qualys SSL Labs scan-result for ${host}: $(cat ${g_tmp}/ssllabs-scan-result)"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user