Tux

...making Linux just a little more fun!

Installing user written Daemons

Cook, William [William.Cook at Vishay.com]


Wed, 02 May 2007 20:11:02 -0700

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


Top    Back


René Pfeiffer [lynx at luchs.at]


Thu, 3 May 2007 14:14:42 +0200

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.

http://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é.


Top    Back


Neil Youngman [ny at youngman.org.uk]


Thu, 3 May 2007 15:15:32 +0100

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.
>
> http://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


Top    Back


Cook, William [William.Cook at Vishay.com]


Thu, 03 May 2007 09:58:17 -0700

Thanks Neil.


Top    Back