[ale] Autostarting non-root processes on RH

Bradley Leonard bradley at stygianresearch.com
Fri Dec 22 11:41:50 EST 2000


Acutally, thats what you should do.  You can use su to run a command as a
user.  I use the following:

   su - seti "-c bin/seti.rc start"

from my rc.local script.  Basically the su command will switch to the user
seti and run the command "bin/seti.rc start".  The "-c" tells su to just run
the following command as the user. 
 
>From the su man page:

	-c, --commmand=COMMAND
              pass a single COMMAND to the shell with -c

You can use the cron.  Just write a wrapper script to see if the process is
running.  If not, start the process.  If it is running, exit quietly.  If
you have any questions, let me know.

Brad

> Under RH6.2, I'm trying to start Zope automatically as a non-root-owned
> process.  The docs do not seem to address autostarting, but rather have
> you typing "./start" to get it going.  
> 
> Creating a link in /etc/rc.d/rc5.d would be great but that leaves Zope
> running as root.  Putting an entry in crontab would work, because the
> start script bombs nicely if there is another instance running. 
> However, every time that runs, there is a spike in CPU and memory usage
> for a few seconds that I'd rather not have.  It also would mean that
> Zope would remain down for some amount of time after the machine
> booted, and although I could reduce the upper bound for how long that
> would be via crontab parameters, that would be at the expense of taking
> more frequent CPU/mem spikes.
> 
> Is there a preferred general way to execute startup scripts as not-root
> at boot time?  The only other thing I can think of would be to put
> something like this in rc.local:
> 
> 	su <username>;/<path_to_startup_script>/start
> 
> but that seems a bit clunky.  
> 
> - Jeff 
> 
> --
> To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in
> message body.


-- 
Bradley Leonard     (bradley at stygianresearch.com)
Stygian Research    (http://stygianresearch.com)

Life is simple.  We make it complicated.

--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list