Installing init scripts on Debian

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

followed by 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).