User Tools

Adding a startup script to be run at bootup

<p>So you have a script of your own that you want to run at bootup, each time you boot up. This will tell you how to do that. </p> <p>Write a script. put it in the /etc/init.d/ directory.

Lets say you called it FOO. You then run</p>

<p> % update-rc.d FOO defaults </p> <p>You also have to make the file you created, FOO, executable, using

$chmod +x FOO

</p> <p>You can check out

% man update-rc.d for more information. It is a Debian utility to install scripts. The option &#8220;defaults&#8221; puts a link to start FOO in run levels 2, 3, 4 and 5. (and puts a link to stop FOO into 0, 1 and 6.)</p>

<p> Also, to know which runlevel you are in, use the runlevel command. </p>

– Main.FredPettis - 25 Feb 2009

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also, you acknowledge that you have read and understand our Privacy Policy. If you do not agree, please leave the website.

More information