From c6bcd464c2689cac0e3860aa41f9e5bba3480da8 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Thu, 18 Feb 2016 13:54:18 +0100 Subject: [PATCH] Avoid changing user for daemonize. Just stick to the basics. --- parity/main.rs | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/parity/main.rs b/parity/main.rs index d0bc05a08..7e66fcbab 100644 --- a/parity/main.rs +++ b/parity/main.rs @@ -58,7 +58,7 @@ Parity. Ethereum Client. Copyright 2015, 2016 Ethcore (UK) Limited Usage: - parity daemon [options] [ --no-bootstrap | ... ] + parity daemon [options] [ --no-bootstrap | ... ] parity [options] [ --no-bootstrap | ... ] Options: @@ -187,19 +187,11 @@ impl Configuration { return; } if self.args.cmd_daemon { - let daemonize = Daemonize::new() - .pid_file("/tmp/parity.pid") // Every method except `new` and `start` - .chown_pid_file(true) // is optional, see `Daemonize` documentation - .working_directory("/tmp") // for default behaviour. - .user("nobody") - .group("daemon") // Group name - .group(2) // Or group id - .privileged_action(|| "Executed before drop privileges"); - - match daemonize.start() { - Ok(_) => info!("Success, daemonized"), - Err(e) => { error!("{}", e); return; }, - } + let daemonize = Daemonize::new().pid_file(self.args.arg_pid_file.clone()).chown_pid_file(true); + match daemonize.start() { + Ok(_) => info!("Daemonized"), + Err(e) => { error!("{}", e); return; }, + } } self.execute_client(); }