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
|
||||
|
||||
|
@ -240,6 +241,9 @@ class Machine(object):
|
|||
if not IsNameOfCriticalService(service_name):
|
||||
continue
|
||||
|
||||
if eval(service["State"]) != "Running":
|
||||
continue
|
||||
|
||||
found.append(service_name)
|
||||
|
||||
return found
|
||||
|
|
Loading…
Reference in New Issue