Skip to content

Commit

Permalink
Added new restart policy
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Villacorta committed Apr 5, 2018
1 parent e0e9111 commit 5b8ed3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/centurion/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 5b8ed3a

Please sign in to comment.