From 6abcebafbe2514fb13588b973250e2b8e12992db Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sun, 29 Jun 2014 12:41:47 +0100 Subject: [PATCH] start as non-root if port switch not required --- Netdisco/bin/netdisco-web | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Netdisco/bin/netdisco-web b/Netdisco/bin/netdisco-web index 59d23210..98652245 100755 --- a/Netdisco/bin/netdisco-web +++ b/Netdisco/bin/netdisco-web @@ -66,6 +66,8 @@ Daemon::Control->new({ stderr_file => file($log_dir, 'netdisco-web.log'), stdout_file => file($log_dir, 'netdisco-web.log'), redirect_before_fork => 0, + ((scalar grep { $_ =~ m/port/ } @args) ? () + : (uid => $uid, gid => $gid)), })->run; # the guts of this are borrowed from Plack::Loader::Restarter - many thanks!!