| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 | 
							- #!/bin/sh
 
- APP_HOME=$HOME
 
- . "$APP_HOME/conf/setenv.sh"
 
- check_app() {
 
-   APP_NAME=$1
 
-   PID_FILE="$PID_DIR/$APP_NAME.pid"
 
-   echo ""
 
-   echo "[INFO] Checking status of $APP_NAME..."
 
-   sleep 1
 
-   if [ -f "$PID_FILE" ]; then
 
-     PID=$(cat "$PID_FILE")
 
-     if ps -p "$PID" > /dev/null 2>&1; then
 
-       echo "[INFO] $APP_NAME is running (PID: $PID)"
 
-     else
 
-       echo "[INFO] $APP_NAME PID file exists but process not found"
 
-     fi
 
-   else
 
-     COUNT=$(ps -eaf | grep java | grep "$APP_NAME" | grep -v grep | wc -l)
 
-     if [ "$COUNT" -gt 0 ]; then
 
-       echo "[INFO] $APP_NAME is running but no PID file found"
 
-     else
 
-       echo "[INFO] $APP_NAME is not running"
 
-     fi
 
-   fi
 
-   echo ""
 
- }
 
- case "$1" in
 
-   utic-ptis-server)
 
-     check_app "$1"
 
-     ;;
 
-   *)
 
-     for APP in $APP_LIST; do
 
-       check_app "$APP"
 
-     done
 
-     ;;
 
- esac
 
- echo "[INFO] Checking process information..."
 
- for APP in $APP_LIST; do
 
-   echo "Checking $APP"
 
-   ps -eaf | grep "$APP" | grep -v grep | grep -v tail | grep java
 
- done
 
- echo ""
 
- ps -eaf | grep java | grep -v grep | grep -v tail
 
- echo ""
 
 
  |