Assuming you use v3+ https://github.com/capistrano/sshkit/blob/master/EXAMPLES.md#run-a-command-in-a-different-directory-as-a-different-user
Lee Hambley http://lee.hambley.name/ +49 (0) 170 298 5667 On 10 June 2016 at 11:33, Vidhan Agarwal <whizv...@gmail.com> wrote: > Hi, I am a sudoer called 'ubuntu' and I want to carry out the following > operations on a remote server:- > > > $ sudo su > > # NR_INSTALL_PHPLIST=/opt/lappstack-5.5.25-0/php/bin > > # export NR_INSTALL_PHPLIST > > # newrelic-install install > > > Please guide me how do I frame my 'execute' commands. > > > Vidhan Agarwal > > -- > You received this message because you are subscribed to the Google Groups > "Capistrano" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to capistrano+unsubscr...@googlegroups.com. > To view this discussion on the web, visit > https://groups.google.com/d/msgid/capistrano/0fd40845-0f35-400c-9a9e-65540f0af234%40googlegroups.com > <https://groups.google.com/d/msgid/capistrano/0fd40845-0f35-400c-9a9e-65540f0af234%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Capistrano" group. To unsubscribe from this group and stop receiving emails from it, send an email to capistrano+unsubscr...@googlegroups.com. To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/CAN_%2BVLWmW7hkCUAbuFNTgU6dWji%2BE3vFErf8Kf%3DV20anr_k1uw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.