What I usually do is copy one of the files in /etc/init.d to a new name, edit it to run whatever program you want, then create links to it in the /etc/rc.d/rc3.d, rc4.d, and rc5.d directories like the other ones in there (make sure it starts with a capital "S" and a unique number).
If you need the program to die gracefully during a shutdown, then create a "kill" link (capital "K") in /etc/rc.d/rc1.d, rc2.d, and rc6.d directories.
|