From cf91c6c90eaee569adfa785059bedd0a63bff3e0 Mon Sep 17 00:00:00 2001 From: silversword411 Date: Fri, 10 Sep 2021 07:31:50 -0400 Subject: [PATCH] troubleshooter adding waits --- troubleshoot_server.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/troubleshoot_server.sh b/troubleshoot_server.sh index ffa99aa0..24578770 100644 --- a/troubleshoot_server.sh +++ b/troubleshoot_server.sh @@ -229,23 +229,27 @@ fi echo -ne ${YELLOW} Checking For Proxy | tee -a checklog.log printf >&2 "\n\n" + echo -ne ${YELLOW} ......this might take a while!! + printf >&2 "\n\n" -# Detect Proxy API -if [ $wanip != $remapiip ]; then - echo -ne ${RED} Proxy detected in front of $rmmdomain | tee -a checklog.log +# Detect Proxy via cert +proxyext=$(openssl s_client -showcerts -servername $remapiip -connect $remapiip:443 2>/dev/null | openssl x509 -inform pem -noout -text) +proxyint=$(openssl s_client -showcerts -servername 127.0.0.1 -connect 127.0.0.1:443 2>/dev/null | openssl x509 -inform pem -noout -text) + +if [[ $proxyext == $proxyint ]]; then + echo -ne ${GREEN} No Proxy detected using Certificate | tee -a checklog.log printf >&2 "\n\n" else - echo -ne ${GREEN} No Proxy detected in front of $rmmdomain | tee -a checklog.log + echo -ne ${RED} Proxy detected using Certificate | tee -a checklog.log printf >&2 "\n\n" fi - -# Detect Proxy Frontend +# Detect Proxy via IP if [ $wanip != $remrmmip ]; then - echo -ne ${RED} Proxy detected in front of $frontenddomain | tee -a checklog.log + echo -ne ${RED} Proxy detected using IP | tee -a checklog.log printf >&2 "\n\n" else - echo -ne ${GREEN} No Proxy detected in front of $frontenddomain | tee -a checklog.log + echo -ne ${GREEN} No Proxy detected using IP | tee -a checklog.log printf >&2 "\n\n" fi