瀏覽代碼

Add a systemctl reload and restart task in capistrano

tags/v0.2.0^2
Bèr Kessels 2 年之前
父節點
當前提交
3563f66a60
共有 1 個檔案被更改,包括 20 行新增0 行删除
  1. 20
    0
      config/deploy.rb

+ 20
- 0
config/deploy.rb 查看文件

@@ -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…
取消
儲存