<% @path = '/etc/monit/monit.d/monit-sphinx.conf' pidfile = "#{Rubber.root}/log/searchd.#{Rubber.env}.pid" start_program = "cd #{Rubber.root} && #{fetch(:rake, 'rake')} ts:start" stop_program = "cd #{Rubber.root} && #{fetch(:rake, 'rake')} ts:stop" %> check process sphinx with pidfile <%= pidfile %> group sphinx-<%= Rubber.env %> start program = "/usr/bin/sudo -H -u <%= rubber_env.app_user %> bash -l -c '<%= start_program %>'" stop program = "/usr/bin/sudo -H -u <%= rubber_env.app_user %> bash -l -c '<%= stop_program %>'" if failed host "<%= rubber_env.host %>" port 9312 with timeout 5 seconds for 5 cycles then restart