Main Site News Other News Screen Shots Lain Spirited Away Linux Misc Mrtg Göteborg Weather

Adding init scripts on Debian GNU/Linux

Installing init scripts on Debian.

In this case we will install myscript.

First cd /etc/init.d then type touch myscript.

Then chmod 0755 myscript.

This creates an empty file, you can then edit that file and add your commands.

Now lets install the script with the following command:

update-rc.d myscript start 99 2 3 4 5 . (note the . on the end).

This puts a symbolic link from myscript to the run levels 2, 3, 4 & 5 so it runs everytime one of the 4 run levels is entered. 99 means that this will be one of the last rules started (01 would be one of the first).