Parcourir la source

Add a systemctl reload and restart task in capistrano

tags/v0.2.0^2
Bèr Kessels il y a 2 ans
Parent
révision
3563f66a60
1 fichiers modifiés avec 20 ajouts et 0 suppressions
  1. 20
    0
      config/deploy.rb

+ 20
- 0
config/deploy.rb Voir le fichier

@@ -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

Chargement…
Annuler
Enregistrer