Howdy Ant Friends, I am having an issue with running a deploy script on a remote server. This command works beautifully:
ssh -t myserver.net /usr/local/bin/sudo -u myuser /path/to/deploy_build.sh But when I invoke this command using exec in ant the '-t' argument does not get used. Otherwise the remote script is run and everything looks good (the app is deployed and jboss is started). In the script, we run the command 'nohup ./run.sh &' and without the '-t' nohup is not used. This results in the output that would normally go to nohup.out to be dumped to the invoking shell and the build to hang because now the shell is being used for the standard output jboss produces. I have tried exec with all <arg value="">, with <arg line=""> only, and various combinations of the two. My google and mail archive searches thus far have been unsuccessful in finding a similar issue. Any suggestions are much appreciated. My ant target: <target name="deploy.build"> <exec executable="ssh"> <!-- <arg value="-t" /> <arg value="${remote.host}" /> <arg value="/usr/local/bin/sudo" /> <arg value="-u" /> <arg value="myuser" /> <arg value="/path/to /deploy_build.sh" />--> <arg line="-t ${remote.host} /usr/local/bin/sudo -u myuser /path/to /deploy_build.sh" /> </exec> </target> Both the invoking server and remote server are running solaris. Thanks, Barry ----------------------------------------- Confidentiality Notice! This electronic transmission and any attached documents or other writings are confidential and are for the sole use of the intended recipient(s) identified above. This message may contain information that is privileged, confidential or otherwise protected from disclosure under applicable law. If the receiver of this information is not the intended recipient, or the employee, or agent responsible for delivering the information to the intended recipient, you are hereby notified that any use, reading, dissemination, distribution, copying or storage of this information is strictly prohibited. If you have received this information in error, please notify the sender by return email and delete the electronic transmission, including all attachments from your system.