update to only reload services that are enabled and running

This commit is contained in:
2025-10-24 02:41:20 +00:00
parent 807b5c21d6
commit 65ccd2ade2

View File

@@ -459,7 +459,7 @@ if __name__ == '__main__':
logger.info('Dataset {} is already unlocked'.format(pool_name))
services = c.call("service.query")
for service in services:
if service['enable'] and service['service'] not in EXCLUDED_SERVICES:
if service['enable'] and service['enable'] == "RUNNING" and service['service'] not in EXCLUDED_SERVICES:
logger.debug('Service {} is enabled'.format(service['service']))
reloaded = c.call("service.control", "RELOAD", service['service'], job=True)
if reloaded: