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"
|
||||
}
|
||||
|
||||
# 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()
|
||||
{
|
||||
RUNNING=0
|
||||
|
@ -700,8 +705,10 @@
|
|||
if [ ! "${FIND}" = "" ]; then
|
||||
RUNNING=1
|
||||
LogText "IsRunning: process '$1' found (${FIND})"
|
||||
return 0
|
||||
else
|
||||
LogText "IsRunning: process '$1' not found"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue