1

I want to mount my EBS volume and start up the Apache/MySQL servers on my EC2 machine, but I can't even get my script to run at startup.

I've tried putting it in:

/etc/init.d/

/etc/rc.d/rc5.d/

/etc/rc.local

None of them are working... Where should I put my script?

Andrew M
  • 115
  • 6
  • What operating system? If it is a CentOS/RHEL derivative (e.g. Amazon's Linux) /etc/init.d/ is good, but you also need to run chkconfig, and turn the service on at the correct run levels. – cyberx86 Aug 17 '11 at 05:21
  • Looks like I fixed it by setting the script chmod +x – Andrew M Aug 17 '11 at 05:26

1 Answers1

2

Make sure your script is runnable. (chmod +x)

But why would you use a script to mount it? You can add it to /etc/fstab.

Bart De Vos
  • 17,761
  • 6
  • 62
  • 81
  • Considering the fact that my newbie-ness has let me forget to make a script executable probably means I shouldn't fool around too much with the file system stuff. I know this works and I won't be rebooting the server very often :P – Andrew M Aug 17 '11 at 14:24
  • @Andrew M: No problem :-) – Bart De Vos Aug 17 '11 at 14:31