lib/capistrano/templates/puma_monit.conf.erb in capistrano3-puma-0.4.1 vs lib/capistrano/templates/puma_monit.conf.erb in capistrano3-puma-0.4.2
- old
+ new
@@ -1,10 +1,7 @@
# Monit configuration for Puma
# Service name: <%= puma_monit_service_name %>
#
check process <%= puma_monit_service_name %>
- with pidfile "<%= fetch(:puma_pid) %>"
- start program = "/bin/su <%= @role.user %> -c 'source $HOME/.bashrc && cd <%= current_path %> && bundle exec puma -C <%= fetch(:puma_conf) %>'"
- stop program = "/bin/su <%= @role.user %> -c 'source $HOME/.bashrc && cd <%= current_path %> && bundle exec pumactl -S <%= fetch(:puma_state) %> stop'"
-
-
-
+ with pidfile "<%= fetch(:puma_pid) %>"
+ start program = "/usr/bin/sudo -u <%= @role.user %> /bin/bash -c 'cd <%= current_path %> && <%= SSHKit.config.command_map[:bundle] %> exec puma -C <%= fetch(:puma_conf) %>'"
+ stop program = "/usr/bin/sudo -u <%= @role.user %> /bin/bash -c 'cd <%= current_path %> && <%= SSHKit.config.command_map[:bundle] %> exec pumactl -S <%= fetch(:puma_state) %> stop'"