Tuesday, July 31, 2001 05:54 PM
The usual way to do daemons in systems (like RedHat) that use sysvinit mechanisms is to write a startup/shutdown script that starts up when the system enters certain run states and shuts down when the system enters certain run states.
You can see many examples of these scripts in /etc/rc.d/init.d/, and symbolic links to these scripts in various /etc/rc.d/rc*.d/ directories for different system runlevels
There's a document that describes how to write these init scripts. On Mandrake, it's installed under /usr/share/doc/initscripts-/sysvinitfiles . In RedHat, I believe you'll find it in that directory or under /usr/doc.