-1

I am trying to start a script at boot and i can't seem to get it to work. I made the file, put it in /etc/init.d, made it executable by chmod +x file.sh, and did update-rc.d file.sh defaults 100. Is there anything else I need to do?

Thanks in advance for your help.

0

1 Answer 1

0

You may have to create a symlink to /etc/rc.d/ :

ln -s /etc/init/file.sh /etc/rc.d/

Or you can add a line in rc.local

2
  • I created symlink to /etc/rc3.d/ as that is the default runlevel for Ubuntu. Oct 27, 2015 at 16:35
  • I think it depends on you version, as I know on ubuntu 14.04 the default run level is /etc/rc2.d/ you check your current run level by runlevel Oct 27, 2015 at 17:00

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