Skip to content

Commit 2f292df

Browse files
authored
Merge pull request #187 from h0tbird/restart_policy_unless-stopped
Added new restart policy
2 parents e0e9111 + 5b8ed3a commit 2f292df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/centurion/service.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def build_host_config(restart_policy = nil)
178178
host_config['RestartPolicy'] = {}
179179

180180
restart_policy_name = restart_policy.name
181-
restart_policy_name = 'on-failure' unless ["always", "on-failure", "no"].include?(restart_policy_name)
181+
restart_policy_name = 'on-failure' unless ["always", "on-failure", "no", "unless-stopped"].include?(restart_policy_name)
182182

183183
host_config['RestartPolicy']['Name'] = restart_policy_name
184184
host_config['RestartPolicy']['MaximumRetryCount'] = restart_policy.max_retry_count || 10 if restart_policy_name == 'on-failure'

0 commit comments

Comments
 (0)