forked from p15670423/monkey
only take running services
This commit is contained in:
parent
ebda00b333
commit
d59e464578
|
@ -214,9 +214,10 @@ class Machine(object):
|
|||
|
||||
name = name.lower()
|
||||
|
||||
for ser in services:
|
||||
if ser in name:
|
||||
return True
|
||||
return name in services
|
||||
#for ser in services:
|
||||
# if ser in name:
|
||||
# return True
|
||||
|
||||
return False
|
||||
|
||||
|
@ -239,6 +240,9 @@ class Machine(object):
|
|||
|
||||
if not IsNameOfCriticalService(service_name):
|
||||
continue
|
||||
|
||||
if eval(service["State"]) != "Running":
|
||||
continue
|
||||
|
||||
found.append(service_name)
|
||||
|
||||
|
|
Loading…
Reference in New Issue