I'm getting this error when I try to use sudo to copy a file from a  
tmp dir to init.d. I'm using Cap 2.4.1 *without* Cap's deploy file, as  
this is a non-rails deployment. Here's the error:

   * executing "sudo -p 'sudo password: ' cp /var/www/apps/tmp/xtfd / 
     servers: ["myserver.com"]
     [myserver.com] executing command
*** [err :: myserver.com] sudo:
*** [err :: myserver.com] sorry, you must have a tty to run sudo
*** [err :: myserver.com]
     command finished
command "sudo -p 'sudo password: ' cp /var/www/apps/tmp/xtfd /etc/ 
init.d/xtfd" failed on myserver.com

Here's my task:

set :user, "deploy"
# etc...

namespace :xtf do

   desc "Setup the XTF server, including the init.d/xtfd script"
   task :setup, :roles => :xtf do
     file = File.join(File.dirname(__FILE__), "templates", "xtfd")
     template = File.read(file)
     buffer = ERB.new(template).result(binding)

     run("mkdir -p #{xtf_tmp}")

     put buffer, "#{xtf_tmp}/xtfd", :mode => 0766
     sudo("cp #{xtf_tmp}/xtfd #{xtfd}")
     sudo("rm -f #{xtf_tmp}/xtfd")
     sudo("chmod 755 #{xtfd}")
     sudo("#{chkconfig} xtfd on")



To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano

Reply via email to