...making Linux just a little more fun!
Cook, William [William.Cook at Vishay.com]
I am fairly new to linux. I've written windows services (a pain), I have just written my first Linux Daemon on Red Hat 9.0. Where can I find info on the proper lay to install my Daemon?
Thanks in advance, WHC
René Pfeiffer [lynx at luchs.at]
On May 02, 2007 at 2011 -0700, Cook, William appeared and said:
> I am fairly new to linux. I've written windows services (a pain), I > have just written my first Linux Daemon on Red Hat 9.0. Where can I > find info on the proper lay to install my Daemon?
The best way to get into this is to look at the system start/stop scripts. Almost all major GNU/Linux distributions use the System V start/stop script methods. The Debian project has a description of what the scripts do and what they are for.
https://www.debian.org/doc/debian-policy/ch-opersys.html
Basically it boils down to writing a start/stop script for your daemon that takes care of cleanly starting and stopping the software. Debian systems have a template in /etc/init.d/skeleton that can be used to create a script from scratch. Most other distributions have templates or examples as well.
HTH, René.
Neil Youngman [ny at youngman.org.uk]
On or around Thursday 03 May 2007 13:14, René Pfeiffer reorganised a bunch of electrons to form the message:
> On May 02, 2007 at 2011 -0700, Cook, William appeared and said: > > I am fairly new to linux. I've written windows services (a pain), I > > have just written my first Linux Daemon on Red Hat 9.0. Where can I > > find info on the proper lay to install my Daemon? > > The best way to get into this is to look at the system start/stop > scripts. Almost all major GNU/Linux distributions use the System V > start/stop script methods. The Debian project has a description of what > the scripts do and what they are for. > > https://www.debian.org/doc/debian-policy/ch-opersys.html > > Basically it boils down to writing a start/stop script for your daemon > that takes care of cleanly starting and stopping the software. Debian > systems have a template in /etc/init.d/skeleton that can be used to > create a script from scratch. Most other distributions have templates or > examples as well.
Also, if you're on a redhat based distribution you should be aware of thee chkconfig utility for managing what's run in each run level. I guess it's roughly equivalent to the program update-rc.d in the debian docs.
HTH
Neil Youngman
Cook, William [William.Cook at Vishay.com]
Thanks Neil.