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
@@ -1,2 +1,2 @@
#!/bin/bash
ps -ef | grep -E 'Main|jboss-modules.jar' | grep -v grep | awk '{print $2}' | tr -d '\n'
pgrep -f 'Main|jboss-modules.jar' | tr -d '\n'
+1 -1
View File
@@ -1,2 +1,2 @@
#!/bin/bash
ps -ef | grep "jetty.home" | grep -v grep | awk '{print $2}' | tr -d '\n'
pgrep -f "jetty.home" | tr -d '\n'
+1 -1
View File
@@ -1,2 +1,2 @@
#!/bin/bash
ps -ef | grep Resin | grep -v grep | awk '{print $2}' | tr -d '\n'
pgrep -f Resin | tr -d '\n'
+1 -1
View File
@@ -1,2 +1,2 @@
#!/bin/bash
ps -ef | grep Bootstrap | grep -v grep | awk '{print $2}' | tr -d '\n'
pgrep -f Bootstrap | tr -d '\n'
+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
+1 -1
View File
@@ -1,2 +1,2 @@
#!/bin/bash
ps -ef | grep WSLauncher | grep -v grep | awk '{print $2}' | tr -d '\n'
pgrep -f WSLauncher | tr -d '\n'