Skip to content

Commit

Permalink
Merge pull request rcbops-cookbooks#42 from claco/v4.2.3rc
Browse files Browse the repository at this point in the history
Merged automatically by jenkins after successful build test
  • Loading branch information
rcbjenkins committed May 28, 2014
2 parents d4988c9 + e47600f commit 417c75f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion providers/procmon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@
"service_bin" => service_bin,
"stop_cmd" => stop_cmd,
"start_cmd" => start_cmd,
"http_checks" => http_checks.sort
"http_checks" => http_checks.sort,
"start_program" => "#{new_resource.service_bin} #{new_resource.script_name} #{new_resource.start_cmd}".strip,
"stop_program" => "#{new_resource.service_bin} #{new_resource.script_name} #{new_resource.stop_cmd}".strip
)
action :create
notifies :restart, "service[monit]", :delayed
Expand Down
8 changes: 6 additions & 2 deletions templates/default/procmon.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ check process <%= @identifier %> pidfile "<%= @pid_file %>"
<% else %>
check process <%= @identifier %> matching "<%= @process_name %>"
<% end %>
start program = "<%= @service_bin -%> <%= @script_name %> <%= @start_cmd %>"
stop program = "<%= @service_bin -%> <%= @script_name %> <%= @stop_cmd %>"
<% unless @start_program.to_s == "" %>
start program = "<%= @start_program -%>"
<% end %>
<% unless @stop_program.to_s == "" %>
stop program = "<%= @stop_program -%>"
<% end %>
<% @http_checks.each do |check| -%>
<%= check %>
<% end -%>

0 comments on commit 417c75f

Please sign in to comment.