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.

pri_newbie
  • 13
  • 1
  • 1
  • 3

1 Answers1

4

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.

hannesh
  • 151
  • 2