Skip to content

Commit

Permalink
[#17] Start "elasticsearch" service immediately if we aren't using Monit
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanwb authored and karmi committed Jul 6, 2012
1 parent 0c42ed2 commit 24d5934
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions recipes/default.rb
Expand Up @@ -104,5 +104,11 @@

# Add Monit configuration file
#
monitrc("elasticsearch", :pidfile => "#{node.elasticsearch[:pid_path]}/#{node.elasticsearch[:node_name].to_s.gsub(/\W/, '_')}.pid") \
if node.recipes.include?('monit')
if node.recipes.include?('monit')
monitrc("elasticsearch",
:pidfile => "#{node.elasticsearch[:pid_path]}/#{node.elasticsearch[:node_name].to_s.gsub(/\W/, '_')}.pid")
else
# ... if we aren't using monit, let's reopen the elasticsearch service and start it
service("elasticsearch") { action :start }
end

0 comments on commit 24d5934

Please sign in to comment.