test: use pgrep command

This commit is contained in:
ReaJason
2025-04-28 00:48:39 +08:00
parent b0fc55064d
commit 7a5b59b560
6 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
pid=""
if command -v ps &> /dev/null; then
pid=$(ps -ef | grep weblogic | grep -v grep | awk '{print $2}')
pid=$(pgrep -f weblogic)
fi
if [ -z "$pid" ]; then