From b6e5d120d3fa4098f307ee05963c98a7064abda7 Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Tue, 11 Jul 2023 01:06:45 +0000 Subject: [PATCH] mongo check [skip ci] --- troubleshoot_server.sh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/troubleshoot_server.sh b/troubleshoot_server.sh index e20721ba..9349a3ed 100644 --- a/troubleshoot_server.sh +++ b/troubleshoot_server.sh @@ -246,16 +246,17 @@ else fi # mongod Service -if [ $mongodstatus = active ]; then - echo -e ${GREEN} Success mongod Service is running | tee -a checklog.log - printf >&2 "\n\n" -else - printf >&2 "\n\n" | tee -a checklog.log - echo -e ${RED} 'mongod Service isnt running (Tactical wont work without this)' | tee -a checklog.log - printf >&2 "\n\n" +if grep -q mongo "/meshcentral/meshcentral-data/config.json"; then + if [ $mongodstatus = active ]; then + echo -e ${GREEN} Success mongod Service is running | tee -a checklog.log + printf >&2 "\n\n" + else + printf >&2 "\n\n" | tee -a checklog.log + echo -e ${RED} 'mongod Service isnt running (Tactical wont work without this)' | tee -a checklog.log + printf >&2 "\n\n" + fi fi - # postgresql Service if [ $postgresqlstatus = active ]; then echo -e ${GREEN} Success postgresql Service is running | tee -a checklog.log