Skip to content

Commit

Permalink
Merge pull request sous-chefs#1090 from scalp42/reload_signal
Browse files Browse the repository at this point in the history
allow configuring reload signal sous-chefs#1089
  • Loading branch information
tas50 authored May 26, 2020
2 parents ca50a53 + 45f7b26 commit 32f3259
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ Containers are process oriented, and move through an event cycle. Thanks to [Gli
- `:unpause` - Unpauses the container.
- `:delete` - Deletes the container.
- `:redeploy` - Deletes and runs the container.
- `:reload` - Sends SIGHUP to pid 1 in the container
- `:reload` - Sends SIGHUP to pid 1 in the container by default. Can be changed with `reload_signal`.

### Properties

Expand Down
3 changes: 2 additions & 1 deletion libraries/docker_container.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class DockerContainer < DockerBase
property :pid_mode, String, default: ''
property :privileged, [true, false], default: false
property :publish_all_ports, [true, false], default: false
property :reload_signal, String, default: 'SIGHUP'
property :remove_volumes, [true, false], default: false
property :restart_maximum_retry_count, Integer, default: 0
property :restart_policy, String
Expand Down Expand Up @@ -637,7 +638,7 @@ def load_container_labels

action :reload do
converge_by "reloading #{new_resource.container_name}" do
with_retries { current_resource.container.kill(signal: 'SIGHUP') }
with_retries { current_resource.container.kill(signal: new_resource.reload_signal) }
end
end

Expand Down

0 comments on commit 32f3259

Please sign in to comment.