Guest User

Untitled

a guest
Jan 21st, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. template "/etc/monit/conf.d/#{app['id']}.monitrc" do
  2. if app['id'] = fdog
  3. source "fdog.monitrc.erb"
  4. else
  5. source "site.monitrc.erb"
  6. end
  7. notifies :run, "execute[monit]"
  8. variables(
  9. :local_ip => node.ec2.local_ipv4,
  10. :app_name => app['id'],
  11. :start_program => "/vitrue/bin/app_#{app['id']} start",
  12. :stop_program => "/vitrue/bin/app_#{app['id']} stop",
  13. :pid_file => "/var/run/vitrue/unicorn_#{app['id']}.pid"
  14. )
  15. only_if do ::File.directory?('/etc/monit/conf.d'); end
  16. end
Add Comment
Please, Sign In to add comment