From af7ff7f5cf1b6f0f4bef1c2ecfd591924ef7f902 Mon Sep 17 00:00:00 2001 From: dinger1986 Date: Wed, 17 Aug 2022 11:42:05 +0100 Subject: [PATCH] Update troubleshoot_server.sh Change SSL check as wasnt working and add output --- troubleshoot_server.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/troubleshoot_server.sh b/troubleshoot_server.sh index d5938290..7c70529e 100644 --- a/troubleshoot_server.sh +++ b/troubleshoot_server.sh @@ -309,9 +309,9 @@ fi printf >&2 "\n\n" #SSL Certificate check -cert=$(openssl verify -CAfile /etc/letsencrypt/live/$domain/chain.pem /etc/letsencrypt/live/$domain/cert.pem) +cert=$(sudo certbot certificates) -if [[ "$cert" == *"OK"* ]]; then +if [[ "$cert" != *"INVALID"* ]]; then echo -ne ${GREEN} SSL Certificate for $domain is fine | tee -a checklog.log printf >&2 "\n\n" @@ -319,6 +319,10 @@ else echo -ne ${RED} SSL Certificate has expired or doesnt exist for $domain | tee -a checklog.log printf >&2 "\n\n" fi + +# Get List of Certbot Certificates +sudo certbot certificates | tee -a checklog.log + echo -ne ${YELLOW} Getting summary output of logs | tee -a checklog.log tail /rmm/api/tacticalrmm/tacticalrmm/private/log/django_debug.log | tee -a checklog.log