Ver código fonte

Add a systemctl reload and restart task in capistrano

tags/v0.2.0^2
Bèr Kessels 2 anos atrás
pai
commit
3563f66a60
1 arquivos alterados com 20 adições e 0 exclusões
  1. 20
    0
      config/deploy.rb

+ 20
- 0
config/deploy.rb Ver arquivo

@@ -40,3 +40,23 @@ set :pty, true
# Uncomment the following to require manually verifying the host key before
# first deploy.
# set :ssh_options, verify_host_key: :secure

namespace :systemd do
desc 'Reload service'
task :reload do
on roles(:app) do
systemctl :reload
end
end

desc 'Show the status of service'
task :status do
on roles(:app) do
systemctl :status
end
end

def systemctl(action)
sudo :systemctl, action, "#{fetch(:application)}.service"
end
end

Carregando…
Cancelar
Salvar