launching background process in capistrano task

前端 未结 5 718
傲寒
傲寒 2020-12-29 11:59

capistrano task

namespace :service do
  desc \"start daemontools (svscan/supervise/svscanboot)\"
  task :start, :roles => :app do
    sudo \"svscanboot&a         


        
5条回答
  •  半阙折子戏
    2020-12-29 12:26

    I think nohup just launches the process in background, so you don't need to explicitly set the last &.

    Did you try

    run "nohup svscanboot >/tmp/svscanboot.log 2>&1"

    (without the ending & to send it to the background).

    That should work and remain running when your current capistrano session is closed.

提交回复
热议问题