Skip to content

Instantly share code, notes, and snippets.

@Drewzar
Created September 14, 2011 21:07
Show Gist options
  • Save Drewzar/1217788 to your computer and use it in GitHub Desktop.
Save Drewzar/1217788 to your computer and use it in GitHub Desktop.
template "/etc/monit/conf.d/#{app['id']}.monitrc" do
if app['id'] = fdog
source "fdog.monitrc.erb"
else
source "site.monitrc.erb"
end
notifies :run, "execute[monit]"
variables(
:local_ip => node.ec2.local_ipv4,
:app_name => app['id'],
:start_program => "/vitrue/bin/app_#{app['id']} start",
:stop_program => "/vitrue/bin/app_#{app['id']} stop",
:pid_file => "/var/run/vitrue/unicorn_#{app['id']}.pid"
)
only_if do ::File.directory?('/etc/monit/conf.d'); end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment