Browse Source

Update 'groupwise.sh'

Adding debug statements to gwMTA part.
Michael Honkoop 1 year ago
parent
commit
2f3685838f
1 changed files with 6 additions and 3 deletions
  1. 6 3
      groupwise.sh

+ 6 - 3
groupwise.sh

@@ -4,9 +4,6 @@
 # Global definitions for the script - change to fit your needs #
 ################################################################
 
-# process to find when loaded via java for the AdminService of GroupWise
-#gwAdminService=1
-
 # process to look for if a GroupWise MailTransferAgent (MTA) is running (leave blank if no MTA is on the client)
 gwMTA=1
 
@@ -29,10 +26,16 @@ then
     if [ $debug -eq 1 ]
     then
         echo "DEBUG: gwMTA is enabled in config, checking for the process."
+    else
+        echo "DEBUG: gwMTA is not enabled in config, skipping."
     fi
     gwMTAProcess=$(ps -ef | grep "gwmta" | grep -v grep | awk '{print $2}')
     if [ ! -z "$gwMTAProcess" ]
     then
+        if [ $debug -eq 1 ]
+        then
+            echo "DEBUG: gwMTA is enabled and we found a process ID: $gwMTAProcess"
+        fi
         gwMTAListener=$(ss -lpn | grep $gwMTAProcess |awk '{print $5}' | grep -E '^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'| sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g') 
         if [ ! -z "$gwMTAListener" ]
         then