I needed to run a script on startup... After looking at init.d (and having troubles with it), I finally settled in on the @reboot flag in crontabl. I was having trouble getting that working too, but I fixed it. If you are having a similar problem, here are some things you can try.
- Make sure that your script is executable
- Chmod +x [yourscript]
- It's a good idea to log your script errors to a file to figure out why the hell it's not working
- @reboot sudo sh /pathtoscript/foo.sh > /pathtologs/foo.log 2>&1
- Check /var/log/syslog to see if crontab ran appropriately