mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-21 22:50:42 +08:00
test: use pgrep command
This commit is contained in:
@@ -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,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,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,2 +1,2 @@
|
||||
#!/bin/bash
|
||||
ps -ef | grep Bootstrap | grep -v grep | awk '{print $2}' | tr -d '\n'
|
||||
pgrep -f Bootstrap | tr -d '\n'
|
||||
@@ -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,2 +1,2 @@
|
||||
#!/bin/bash
|
||||
ps -ef | grep WSLauncher | grep -v grep | awk '{print $2}' | tr -d '\n'
|
||||
pgrep -f WSLauncher | tr -d '\n'
|
||||
Reference in New Issue
Block a user