sudo を使わない設定
なんだか使ってみようという人が増えて嬉しい。
「deploy実行するユーザーがsudo使えないとダメ」ってのは、 sudo 使わないオプションを指定すればよさそう。 cap show_tasks の spinner のところに書いてあった。 (deploy はサーバを再起動するために、内部で spinner を呼んでる)
Start the spinner daemon for the application (requires script/spin). This will use sudo to start the spinner by default, unless :use_sudo is false. If using sudo, you can specify the user that the spinner ought to run as by setting the :spinner_user variable (defaults to :app).
config/deploy.rb に一行追加して、結果を比べてみる。
set :use_sudo, false
sudo を使う設定の場合(デフォルト)
$ cap deploy * executing "sudo /home/machu/deploy/capping/current/script/process/reaper"
sudo を使わない設定の場合 (:use_sudo が false)
$ cap deploy * executing "/home/machu/deploy/capping/current/script/process/reaper"