Kaynağa Gözat

Add a systemctl reload and restart task in capistrano

tags/v0.2.0^2
Bèr Kessels 2 yıl önce
ebeveyn
işleme
3563f66a60
1 değiştirilmiş dosya ile 20 ekleme ve 0 silme
  1. 20
    0
      config/deploy.rb

+ 20
- 0
config/deploy.rb Dosyayı Görüntüle

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

Loading…
İptal
Kaydet