Philip-
The nohup has to be in the cap recipe not in a script on the server.
task :restart, :roles => :app do
run 'kill `ps aux | grep push_server | grep -v grep | cut -c 10-15`'
run 'cp ~/juggernaut.yml champion/current/config/'
run 'chmod 755 ~/champion/current/public ' +
'~/champion/current/public/dispatch*'
run "cd #{current_path} && nohup ./script/start_juggernaut.sh &"
end
-Ezra
On Feb 18, 2007, at 11:13 AM, Phlip wrote:
>
> Vegan Buddy wrote:
>
>> Put nohup at the beginning and & at the end. The nohup will
>> allow it
>> outlive its TTY.
>>
>> run('nohup ruby script/push_server &')
>
> That works fine from the SSH shell, and I can't get it working from
> deploy.rb. Start with script/start_juggernaut.sh:
>
> cd ~/champion/current
> nohup ruby script/push_server &
>
> Then run this restarter:
>
> task :restart, :roles => :app do
> run 'kill `ps aux | grep push_server | grep -v grep | cut -c 10-15`'
> run 'cp ~/juggernaut.yml champion/current/config/'
> run 'chmod 755 ~/champion/current/public ' +
> '~/champion/current/public/dispatch*'
> run "sh #{current_path}/script/start_juggernaut.sh"
> end
>
> The transcript naturally can't say if anything went wrong after the
> shell:
>
> * executing "sh /home/myglad/champion/current/script/
> start_juggernaut.sh"
>
> And no process or nohup.out ever show up.
>
> --
> Phlip
> http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
>
>
> >
-- Ezra Zygmuntowicz
-- Lead Rails Evangelist
-- [EMAIL PROTECTED]
-- Engine Yard, Serious Rails Hosting
-- (866) 518-YARD (9273)
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---