我使用capistrano v3部署到RoR生产服务器。该应用程序部署到/[...]/apps/myapp/current
,每个都发布“当前”目录更改。我想通知所有用户有关更改的信息。我想使用wall
,但收到错误wall: cannot get tty name: Inappropriate ioctl for device
。但是,wall
命令在ssh
会话中有效,所以我想这是因为capistrano不是交互式shell。我目前在deploy.rb
中的代码:
task :notify_deployed do
on roles(:app) do
run_locally do
execute 'wall /[...]/apps/myapp/shared/cap_msg.txt'
end
end
end
after "deploy:finished", :notify_deployed