From 5b8ed3a02eb4e171aea46db331bc19fc88ceebcd Mon Sep 17 00:00:00 2001 From: Marc Villacorta Date: Thu, 5 Apr 2018 18:40:31 +0200 Subject: [PATCH] Added new restart policy --- lib/centurion/service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/centurion/service.rb b/lib/centurion/service.rb index 26d39eee..78b04908 100644 --- a/lib/centurion/service.rb +++ b/lib/centurion/service.rb @@ -178,7 +178,7 @@ def build_host_config(restart_policy = nil) host_config['RestartPolicy'] = {} restart_policy_name = restart_policy.name - restart_policy_name = 'on-failure' unless ["always", "on-failure", "no"].include?(restart_policy_name) + restart_policy_name = 'on-failure' unless ["always", "on-failure", "no", "unless-stopped"].include?(restart_policy_name) host_config['RestartPolicy']['Name'] = restart_policy_name host_config['RestartPolicy']['MaximumRetryCount'] = restart_policy.max_retry_count || 10 if restart_policy_name == 'on-failure'