First off you want to put the script into /etc/init.d
then add a symlink in /etc/rc.d/rc3.d to /etc/init.d/<your script>
the symlink should, depending on when you want to start the script off, look something like this: S69foobar
The `S' means that it will start in this run level i.e. rc3. The number `69' is the numerical start position of your script. So if you have another script that is S68 then that will be run first.
If the script is a daemon then you will more than likely want to kill it when you shutdown/restart the computer so you will need to put another symlink in /etc/rc.d/rc6.d but instead of using an `S' use a `K' (for kill). Naturally your script should have cases in it so that it will know what to do.
|