diff options
author | Vishvananda Ishaya <vishvananda@yahoo.com> | 2010-09-11 08:16:16 -0700 |
---|---|---|
committer | Vishvananda Ishaya <vishvananda@yahoo.com> | 2010-09-11 08:16:16 -0700 |
commit | 603c8f8c87c1b08d58ac0b240c1ad70a928e113d (patch) | |
tree | f4401a44754558434dca12c22edf54035130d5a4 /nova/server.py | |
parent | fc5e1c6f0bee14fdb85ad138324062ceaa598eee (diff) | |
parent | e21c310ced6992cf2eb33b372cd4e5e69a79d140 (diff) | |
download | nova-603c8f8c87c1b08d58ac0b240c1ad70a928e113d.tar.gz nova-603c8f8c87c1b08d58ac0b240c1ad70a928e113d.tar.xz nova-603c8f8c87c1b08d58ac0b240c1ad70a928e113d.zip |
merged trunk
Diffstat (limited to 'nova/server.py')
-rw-r--r-- | nova/server.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/nova/server.py b/nova/server.py index 96550f078..d4563bfe0 100644 --- a/nova/server.py +++ b/nova/server.py @@ -44,6 +44,8 @@ flags.DEFINE_bool('use_syslog', True, 'output to syslog when daemonizing') flags.DEFINE_string('logfile', None, 'log file to output to') flags.DEFINE_string('pidfile', None, 'pid file to output to') flags.DEFINE_string('working_directory', './', 'working directory...') +flags.DEFINE_integer('uid', os.getuid(), 'uid under which to run') +flags.DEFINE_integer('gid', os.getgid(), 'gid under which to run') def stop(pidfile): @@ -58,7 +60,7 @@ def stop(pidfile): sys.stderr.write(message % pidfile) return # not an error in a restart - # Try killing the daemon process + # Try killing the daemon process try: while 1: os.kill(pid, signal.SIGTERM) @@ -135,6 +137,8 @@ def daemonize(args, name, main): threaded=False), stdin=stdin, stdout=stdout, - stderr=stderr + stderr=stderr, + uid=FLAGS.uid, + gid=FLAGS.gid ): main(args) |