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 one possibility:

1. An Entry In /etc/inittab(action=respawn)
-------------------------------------------
A method I can think of is writing a shell script to su into my user and run
the daemon:

#!/bin/sh
#
# mydaemon.sh
su -c "mydaemond" myuser

If I add the the following entry into intitab:

100:5:respawn:/usr/local/bin/mydaemon.sh



I am testing this scenario with a daemon which crashes almost instantly. It
is being restarted very quickly 10 times in succession, then there is a
larger gap until the next 10 respawns. Is there a better way of doing this?
TAI.


Cal McPherson
Software Engineer
ADTEC Communications
Phone: +612 9213 9917 Fax: +612 9281 7575
Email: [EMAIL PROTECTED]
Web: www.adtec.com.au
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to