From 50435425e5d8bfea84c000629f9d82feebc5690b Mon Sep 17 00:00:00 2001 From: silversword411 Date: Fri, 21 Jan 2022 11:51:54 -0500 Subject: [PATCH] adding all services to troubleshooting script --- troubleshoot_server.sh | 49 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/troubleshoot_server.sh b/troubleshoot_server.sh index 7a28c10c..688a1667 100644 --- a/troubleshoot_server.sh +++ b/troubleshoot_server.sh @@ -2,6 +2,7 @@ # Tactical RMM install troubleshooting script # Contributed by https://github.com/dinger1986 +# v1.1 1/21/2022 update to include all services # This script asks for the 3 subdomains, checks they exist, checks they resolve locally and remotely (using google dns for remote), # checks services are running, checks ports are opened. The only part that will make the script stop is if the sub domains dont exist, theres literally no point in going further if thats the case @@ -134,6 +135,10 @@ celerybeatstatus=$(systemctl is-active celerybeat) nginxstatus=$(systemctl is-active nginx) natsstatus=$(systemctl is-active nats) natsapistatus=$(systemctl is-active nats-api) +meshcentralstatus=$(systemctl is-active meshcentral) +mongodstatus=$(systemctl is-active mongod) +postgresqlstatus=$(systemctl is-active postgresql) +redisserverstatus=$(systemctl is-active redis-server) # RMM Service if [ $rmmstatus = active ]; then @@ -210,6 +215,50 @@ else echo -ne ${RED} 'nats-api Service isnt running (Tactical wont work without this)' | tee -a checklog.log printf >&2 "\n\n" +fi + +# meshcentral Service +if [ $meshcentralstatus = active ]; then + echo -ne ${GREEN} Success meshcentral Service is running | tee -a checklog.log + printf >&2 "\n\n" +else + printf >&2 "\n\n" | tee -a checklog.log + echo -ne ${RED} 'meshcentral Service isnt running (Tactical wont work without this)' | tee -a checklog.log + printf >&2 "\n\n" + +fi + +# mongod Service +if [ $mongodstatus = active ]; then + echo -ne ${GREEN} Success mongod Service is running | tee -a checklog.log + printf >&2 "\n\n" +else + printf >&2 "\n\n" | tee -a checklog.log + echo -ne ${RED} 'mongod Service isnt running (Tactical wont work without this)' | tee -a checklog.log + printf >&2 "\n\n" + +fi + +# postgresql Service +if [ $postgresqlstatus = active ]; then + echo -ne ${GREEN} Success postgresql Service is running | tee -a checklog.log + printf >&2 "\n\n" +else + printf >&2 "\n\n" | tee -a checklog.log + echo -ne ${RED} 'postgresql Service isnt running (Tactical wont work without this)' | tee -a checklog.log + printf >&2 "\n\n" + +fi + +# redis-server Service +if [ $redisserverstatus = active ]; then + echo -ne ${GREEN} Success redis-server Service is running | tee -a checklog.log + printf >&2 "\n\n" +else + printf >&2 "\n\n" | tee -a checklog.log + echo -ne ${RED} 'redis-server Service isnt running (Tactical wont work without this)' | tee -a checklog.log + printf >&2 "\n\n" + fi echo -ne ${YELLOW} Checking Open Ports | tee -a checklog.log