[lug] simple bash Q.
Peter Hutnick
peter at fpcc.net
Fri Mar 8 21:19:48 MST 2002
On Saturday 09 March 2002 04:01 pm, D. Stimits wrote:
> Peter Hutnick wrote:
> > On Saturday 09 March 2002 03:29 pm, D. Stimits wrote:
> One other question if anyone here is familiar with init scripts (in my
> case RH 7.x, but any info is desired). If an init script wishes to
> transfer a new startup process from root to some other user with less
> privileges, would the usual way be via su -c? Or would there be some
> other convention for doing this within an init script? The script in
> question will be in /etc/rc.d/init.d/, or the comparable location for
> any linux distro.
RH comes with a function library in /etc/rc.d/init.d/functions.
One of these functions is "daemon."
If you, for instance want foo to run as foo_user you'd do "daemon --user
foo_user foo"
-Peter
More information about the LUG
mailing list