launching background process in capistrano task

前端 未结 5 688
傲寒
傲寒 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:36

    My simple solution would be make svscanboot.sh file at remote server with whatever code you want to run. In your case

    svscanboot >/tmp/svscanboot.log 2>&1
    

    In cap rake task add this

    run "sh +x somefile.sh &"
    

    this works well for me.

提交回复
热议问题