views:

210

answers:

1

Hello. I'm using Amazon EC2 with a Fedora 8 Core AMI. I have an EBS volume mounted at /ebsmnt, and a startupscript located at /ebsmnt/startupscript.sh . Currently I have to login to the server, cd to /ebsmnt/ and run the script manually. How can I make Fedora run this script automatically at startup, without any interaction from me? (by having it on /ebsmnt/ I don't have to recompile the AMI everytime I wish to make changes to the script). I'm not too familiar with *nix, so a step by step guide would be very much appreciated.

+1  A: 

The contents of the file /etc/rc.local are executed on startup.
note: You will have to add the full path to the script.

Does the script understand the "Start" and "Stop" parameters? If so it could be added to the runlevels.

Jay Dubya
Don't know about start/stop, but adding the line to /etc/rc.local works. Thanks!
Mads Mobæk