Create a daemon on Linux (RedHat 7.0)
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sandra_DeWit
Posted On:   Tuesday, July 31, 2001 08:41 AM

Hi, I've written a program in Java using JBuilder4 and now need to turn it into a daemon to run on Linux. How do I do this?? I've tried downloading the program 'daemon' but I can't get it to work. Any help is much appreciated - thanx in advance.

Re: Create a daemon on Linux (RedHat 7.0)

Posted By:   Nathan_Meyers  
Posted On:   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.

About | Sitemap | Contact