Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
What's the content of the first line of your .sh file? –  Marcel May 7 '13 at 10:57

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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