mirror of https://github.com/CISOfy/lynis.git
Added return values to IsRunning function
This commit is contained in:
parent
a991f73520
commit
17c435801d
|
@ -689,8 +689,13 @@
|
||||||
LogText "Action: Performing plugin tests"
|
LogText "Action: Performing plugin tests"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Is a process running?
|
################################################################################
|
||||||
# Returns: RUNNING
|
# Name : IsRunning()
|
||||||
|
# Description : Check if a process is running
|
||||||
|
# Returns : 0 (process is running), 1 (process not running)
|
||||||
|
# RUNNING (1 = running, 0 = not running)
|
||||||
|
################################################################################
|
||||||
|
|
||||||
IsRunning()
|
IsRunning()
|
||||||
{
|
{
|
||||||
RUNNING=0
|
RUNNING=0
|
||||||
|
@ -700,8 +705,10 @@
|
||||||
if [ ! "${FIND}" = "" ]; then
|
if [ ! "${FIND}" = "" ]; then
|
||||||
RUNNING=1
|
RUNNING=1
|
||||||
LogText "IsRunning: process '$1' found (${FIND})"
|
LogText "IsRunning: process '$1' found (${FIND})"
|
||||||
|
return 0
|
||||||
else
|
else
|
||||||
LogText "IsRunning: process '$1' not found"
|
LogText "IsRunning: process '$1' not found"
|
||||||
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue