mirror of https://github.com/CISOfy/lynis.git
Improved IsRunning() process matching (#463)
This commit is contained in:
parent
79278c32ef
commit
ccf9db18f8
|
@ -1245,8 +1245,8 @@
|
|||
IsRunning() {
|
||||
if [ $# -eq 0 ]; then ExitFatal "Missing parameter when calling IsRunning function"; fi
|
||||
RUNNING=0
|
||||
PSOPTIONS=""
|
||||
if [ ${SHELL_IS_BUSYBOX} -eq 0 ]; then PSOPTIONS=" ax"; fi
|
||||
PSOPTIONS=" -o args="
|
||||
if [ ${SHELL_IS_BUSYBOX} -eq 0 ]; then PSOPTIONS=" -o args= -C $1"; fi
|
||||
FIND=$(${PSBINARY} ${PSOPTIONS} | egrep "( |/)$1" | grep -v "grep")
|
||||
if [ ! "${FIND}" = "" ]; then
|
||||
RUNNING=1
|
||||
|
|
Loading…
Reference in New Issue