Glad to hear it works! Yes. You'll see a symlink in your home pointing to the script that is actually executed. You can read it to have a better understanding of how it works.
Zack: do you know an AMI that doesn't support that? I'll have a look and try to build a working wrapper. El 13/09/2013 22:21, "Nishant Chandra" <nishant.chan...@gmail.com> escribió: > I am using Amazon linux 64 bit AMI. > > Thanks Ignasi. I could debug and realized that if I wrap it in init script > and gave full path to the script i.e. > .addStatement(exec("/home/ec2-user/run.sh")), then it worked. > > So is it that temporary scripts are created in /tmp and user scripts are > executed from there? > > > > On Sat, Sep 14, 2013 at 12:57 AM, Zack Shoylev <zack.shoy...@rackspace.com > > wrote: > >> I have seen some images that do not support bash-shopt which is what >> jclouds uses to wrap scripts (in the header). >> What image is being used? >> >> ------------------------------ >> *From:* Ignasi [ignasi.barr...@gmail.com] >> *Sent:* Friday, September 13, 2013 2:19 PM >> *To:* user@jclouds.incubator.apache.org >> *Subject:* Need help running scripts on EC2 >> >> A couple considerations: >> >> * You don't have to manually render the script. You can directle pass >> the 'exec("foo")' to the submitScriptOnNode method and jclouds will take >> care of rendering it properly depending on the type of the Template being >> deployed. >> * Why don't you want to wrap it in the init script? If you wrap it (which >> is done by default), you will see a directory created in /tmp containing >> files with the stdout and the stderr for the script. You can tail them to >> see the progress, or paste them here to diagnose what can be going on. >> * By default jclouds waits until the script completes, so if the server >> is started in the foreground by your script, it may not terminate, and the >> returned future will wait forever. If this is the case, perhaps a better >> approach would be to wrap your script in a nohup. >> >> >> HTH >> >> Ignasi >> >> >> On Friday, 13 September 2013, Andrew Phillips wrote: >> >>> The script does not start. The script starts a server and exits, >>>> something >>>> like java -jar somejar.jar >>>> >>> >>> Have you tried putting any "echo starting > /my/log/file" statements in >>> the script, just to see if it even ever gets invoked? >>> >>> Regards >>> >>> ap >>> >> > > > -- > Nishant Chandra > Bangalore, India > Cell : +91 9739131616 >