test: use pgrep command

This commit is contained in:
ReaJason
2025-05-14 00:34:32 +08:00
parent 9fb653b6f8
commit a883c9914e
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