Browse Source

Update 'groupwise.sh'

updating routines for gwAdminService
Michael Honkoop 1 year ago
parent
commit
4085219f18
1 changed files with 8 additions and 3 deletions
  1. 8 3
      groupwise.sh

+ 8 - 3
groupwise.sh

@@ -140,14 +140,19 @@ then
     gwAdminListener=$(ss -lpn| grep $gwAdminProcess | awk '{print $5}' | grep -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | sort -u | sed 's/^::ffff://')
     if [ ! -z "$gwAdminListener" ]
     then
-        echo "DEBUG:We found atleast one gwAdmin listener: $gwAdministener"
-    fi
-    echo "P \"Groupwise AdminService\" count=1;;;1 GroupWise AdminService process is running with PID: $gwAdminProcess and listening.\n $gwAdministener"
+        if [ $debug -eq 1 ]
+        then
+            echo "DEBUG:We found atleast one gwAdmin listener: $gwAdministener"
+        fi
+        echo "P \"Groupwise AdminService\" count=1;;;1 GroupWise AdminService process is running with PID: $gwAdminProcess and listening.\n $gwAdministener"
     else
         if [ $debug -eq 1 ]
         then
             echo "DEBUG:We found no listeners for the gwAdminService process with process ID: $gwAdminProcess"
         fi
+        echo "P \"Groupwise AdminService\" status=0.5;;;1 GroupWise AdminService is running with PID: $gwAdminProcess but not listening."
+    fi
+    echo "P \"GroupWise AdminService\" status=0;;;1 GroupWise AdminService process is not Running."
 fi