浏览代码

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

正在加载...
取消
保存