0

Where should i place my script in amazon instance such that my script should run when my instance boots up?

I tried placing it in rc.local but it didnt help.

My script is about connecting to Amazon S3, uploading some docs & downloading some docs. I have written my script in python and placed it inside a .sh file.

  • What's the content of the first line of your .sh file? – Marcel May 7 '13 at 10:57
3

Scripts from rc.local should run just fine on boot. You may just have a bug in your script. You could try adding logging to your script in the rc.local like such:

/path/to/myscripts/myscript.sh > /var/log/log.txt 2>&1

Then boot up and check the log for any errors. One usual suspect is not using absolute paths in the scripts so that might be worth a check.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.