SDB:How to Create Your Own Init Script
You want to create your own init script which will be started and stopped in certain runlevels.
You also want to control this script by means of:
Copy the sample init script to your new script:
cp /etc/init.d/skeleton /etc/init.d/<scriptname>
Edit the file /etc/init.d/<scriptname> with a text editor of your choice and read and follow its instructions.
Now activate your script so that it can be run when the system boots:
Finally, create a link to /sbin:
ln -s /etc/init.d/<scriptname> /sbin/rc<scriptname>
For further information, please refer to the following manpages:
init(8), init.d(7), insserv(8) <keyword>init,script,init.d,initscript,init-script,insserv</keyword>