Closed nleo closed 5 years ago
require 'capistrano/systemd/multiservice'
install_plugin Capistrano::Systemd::MultiService.new_service('rpush', service_type: 'user')
@nleo
Do you have config/systemd/rpush.service.erb
file?
If not, and if you don't want to put the file, please try to set systemd_rpush_service
in config/deploy.rb or config/deploy/stage.rb like this:
set :systemd_rpush_service, ->{ "rpush.service" }
ping @nleo
Hi, for now I use this code in my deploy.rb
namespace :rpush do
desc 'restart rpush'
task :restart do
on roles(:app) do
execute 'systemctl --user restart rpush'
end
end
end
Mayby later in new project I test your variant. Thanks for response
I install and enamble unit with Ansible to
~/.config/systemd/user/rpush.service
I try to
cap staging systemd:rpush:restart
, but got an error:I think command should be
systemctl --user restart rpush
, but it don't.