Files
MemShellParty/integration-test/script/weblogic_pid.sh
T
2025-05-14 00:34:32 +08:00

12 lines
203 B
Bash
Executable File

#!/bin/bash
pid=""
if command -v ps &> /dev/null; then
pid=$(pgrep -f weblogic)
fi
if [ -z "$pid" ]; then
pid=$(jps 2>/dev/null | grep " Server" | awk '{print $1}')
fi
echo "$pid" | tr -d '\n'