fixed default_service_policy setting
This commit is contained in:
parent
45eefb251b
commit
10d1999340
@ -172,6 +172,7 @@ def restart_services():
|
||||
return recommend_restart
|
||||
|
||||
def _get_service_restart_policy(service):
|
||||
log = logging.getLogger(sau.LOGNAME)
|
||||
conf = sau.config
|
||||
policy = conf.get('services', service, fallback=None)
|
||||
if policy and policy.lower() in ('restart', 'warn', 'ignore', 'silent-restart'):
|
||||
@ -179,7 +180,7 @@ def _get_service_restart_policy(service):
|
||||
elif policy:
|
||||
log.warning('service policy {} for {} is invalid'.format(policy, service))
|
||||
|
||||
default_policy = conf.get('services', 'default_service_policy', fallback='warn')
|
||||
default_policy = conf.get('default', 'default_service_policy', fallback='warn')
|
||||
if default_policy.lower() in ('restart', 'warn', 'ignore', 'silent-restart'):
|
||||
return default_policy.lower()
|
||||
log.warning('default service policy {} is invalid'.format(default_policy))
|
||||
|
Loading…
Reference in New Issue
Block a user