linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Customization: automating daemon.
@ 2004-08-10  1:56 Cal McPherson
  2004-08-10  6:57 ` Sascha Retzki
  2004-08-10 14:38 ` Ag. System Administrator
  0 siblings, 2 replies; 3+ messages in thread
From: Cal McPherson @ 2004-08-10  1:56 UTC (permalink / raw)
  To: 'linux-admin@vger.kernel.org'

I need to customize RedHat 9 to run a daemon with the following
requirements: 

Daemon needs to:
- run all the time in the background as it receives service requests via
hardware not ports.
- restart if it crashes.
- run as a user other than root.

Before the daemon can run:
- certain rc5.d scripts need to have all started.


So far I have thought of two possibilities:

1. An Entry In /etc/inittab
---------------------------
But I can't find a method of running these entries as a non-root user.

2. An xinetd service
--------------------
But I need the service to be running all the time in the background, and to
restart if it crashes.

I think I am asking for a cross between inetd(run all the time, run as
non-root user), and inittab(respawn).

If you have any ideas TIA.



Cal McPherson
Software Engineer
ADTEC Communications
Phone: +612 9213 9917 Fax: +612 9281 7575
Email: calm@adtec.com.au
Web: www.adtec.com.au

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Customization: automating daemon.
  2004-08-10  1:56 Customization: automating daemon Cal McPherson
@ 2004-08-10  6:57 ` Sascha Retzki
  2004-08-10 14:38 ` Ag. System Administrator
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Retzki @ 2004-08-10  6:57 UTC (permalink / raw)
  To: 'linux-admin@vger.kernel.org'

Am Di, 2004-08-10 um 03.56 schrieb Cal McPherson:

> I think I am asking for a cross between inetd(run all the time, run as
> non-root user), and inittab(respawn).
> 
> If you have any ideas TIA.
> 

inittab sounds great, you surely can do something like:
7:2345:respawn:/bin/su - <user> -c "<command> [<arg1>] [<argN>]"


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Customization: automating daemon.
  2004-08-10  1:56 Customization: automating daemon Cal McPherson
  2004-08-10  6:57 ` Sascha Retzki
@ 2004-08-10 14:38 ` Ag. System Administrator
  1 sibling, 0 replies; 3+ messages in thread
From: Ag. System Administrator @ 2004-08-10 14:38 UTC (permalink / raw)
  To: linux-admin

Cal McPherson wrote:
> I need to customize RedHat 9 to run a daemon with the following
> requirements: 
> 
> Daemon needs to:
> - run all the time in the background as it receives service requests via
> hardware not ports.
> - restart if it crashes.
> - run as a user other than root.
> 
> Before the daemon can run:
> - certain rc5.d scripts need to have all started.
> 
> 
> So far I have thought of two possibilities:
> 
> 1. An Entry In /etc/inittab
> ---------------------------
> But I can't find a method of running these entries as a non-root user.
> 
> 2. An xinetd service
> --------------------
> But I need the service to be running all the time in the background, and to
> restart if it crashes.
> 
> I think I am asking for a cross between inetd(run all the time, run as
> non-root user), and inittab(respawn).
> 
> If you have any ideas TIA.
> 
> 
> 
> Cal McPherson
> Software Engineer
> ADTEC Communications
> Phone: +612 9213 9917 Fax: +612 9281 7575
> Email: calm@adtec.com.au
> Web: www.adtec.com.au
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

Heya,

try daemontools: http://cr.yp.to/daemontools.html
This mainly used for qmail, but by behaviour it fits best for your requirements (i think so ;)

Hope that helps.

Adios,

D


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-08-10 14:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-10  1:56 Customization: automating daemon Cal McPherson
2004-08-10  6:57 ` Sascha Retzki
2004-08-10 14:38 ` Ag. System Administrator

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).