On Wed, 08 Dec 2004 15:01:13 -0800
Kevin Williams <[EMAIL PROTECTED]> wrote:

> All,
> 
> I'm working on a project where I have to start up some commands
> that run for the life of the computer's up time.  I would like
> these to start when the computer boots up, and stop after the
> computer shuts down(running Redhat).
> 
> What I have to run are pretty simple commands:
> 1.  multiple perl calls
> 2.  multiple command tail -f log_file_name | logger local3.info
>

Commands intended to run for the duration of uptime provide
services known as daemons.  Best practice and easiest setup for
this is with daemontools.  See:

 http://thedjbway.org/daemontools.html

The package provides a consistent, platform independent interface
to all services you care to install:

 Start a service:
    svc -u /service/myservice

 Stop a service:
    svc -d /service/myservice

 Restart a service:
    svc -t /service/myservice

 Hup a service:
    svc -h /service/myservice

Etc.  Writing run scripts for daemontools is easy, platform
neutral, with no need to keep track of pids.  The package also
provides very easy logging for any of your services, with the
multilog utility.

Tutorials and many examples are provided at thedjbway.org.

Based on the same principle, with a few more advanced features
and under active development, is Gerrit Pape's runit package:

 http://smarden.org/runit/index.html

Note that although his package is designed to replace init, it
is not necessary to do so; you can just use the utilities as you
would with daemontools.

Wayne
 
-- 
Wayne Marshall
[EMAIL PROTECTED]
_______________________________________________
PDXLUG mailing list
[EMAIL PROTECTED]
http://pdxlug.org/mailman/listinfo/pdxlug

Reply via email to