0.6.3 tricks to run task as specific user?

J.B. Nicholson-Owens jbn at illinois.edu
Wed Jan 5 17:11:34 UTC 2011


Janne Karhunen wrote:
> Is there any elegant way to run task as specific user in 0.6.3?
> Can't spot a stanza and would like to get rid of the su* trickery.

Is there a preferred way to run a process as a user?  I'd like to run a 
server process not as root, so this is of interest to me.

I'm trying to run a radmind server (executable /usr/sbin/radmind) as the 
"radmind" user and use Upstart to keep it running as long as there is an 
active network connection.

Here's the upstart job I was going to use:

=========================
#
# Start the radmind server
#
description "radmind server"
author "J.B. Nicholson-Owens <jbn at illinois.edu>"
version "1.0"

start on network
expect fork

script
      sudo -u radmind /usr/sbin/radmind
end script
=========================

If there is a better way to do this, please let me know on this list.
Any other tips also appreciated as I am new to Upstart.

Thanks.
-- 
J.B. Nicholson-Owens, Website and Network Administrator



More information about the upstart-devel mailing list