[Techtalk] Automatically running daemons on startup

Dragan Stanojevic - Nevidljivi invisible at hidden-city.net
Fri Feb 7 13:04:18 EST 2003


Hi!

 > I want to run a daemon process when my Red Hat machine starts up. I 
know how to use scripts in /etc/rc.d/ to accomplish this, but I have two 
questions:

 > 1) Is there a boiler plate script somewhere that I can use?
Any file in /etc/rc.d/init.d is a great template. Don't forget to make 
symlinks in rcN.d dirs...

 > 2) How do I get the daemon to run as a user other than root? (I.e., 
how can I write an automated command that runs a program as another user?)
in script run it as:
    su username_to_run_as -c "daemon with args"

I hope this will help you...
N::





More information about the Techtalk mailing list