sudo cp /etc/init.d/skeleton /etc/init.d/<jobname>
  • Edit it to give the path and arguments
sudo vi /etc/init.d/<jobname>
  • Update initrd
sudo update-rc.d <jobname> defaults

That's all. The job will run from the next time the system starts.






This work is licensed under the CC By-SA 3.0 , without all the cruft that would otherwise be put at the bottom of the page.

Sister Sites: GATE CSE Wiki, GATE CSE, Aptitude Overflow