small fix

This commit is contained in:
Jordi Sanfeliu 2014-03-11 09:59:59 +01:00
parent 133d8ab17b
commit 7a3236cdc8
1 changed files with 1 additions and 1 deletions

View File

@ -411,6 +411,7 @@ $0 = sprintf("%s %s%s%s%s",
$options{d} ? " -d $options{d}" : "", $options{d} ? " -d $options{d}" : "",
$options{v} ? " -v" : ""); $options{v} ? " -v" : "");
daemonize();
logger("Starting Monitorix version " . VERSION . " (pid $$)."); logger("Starting Monitorix version " . VERSION . " (pid $$).");
# save the pidfile # save the pidfile
@ -427,7 +428,6 @@ unless(chdir("/tmp")) {
die "can't chdir to /tmp: $!"; die "can't chdir to /tmp: $!";
} }
daemonize();
if($options{d}) { if($options{d}) {
if($options{d} ne "none" && $options{d} ne "all") { if($options{d} ne "none" && $options{d} ne "all") {
@{$config{debug}} = split(',', $options{d}); @{$config{debug}} = split(',', $options{d});