Fix -daemon command-line argument parsing

It turns out the logic removed in
d10601de11 had a purpose after all.
This commit is contained in:
Richard Hansen 2020-07-14 23:13:00 -04:00
parent cfcf5c1c04
commit 286fe02478

View file

@ -1295,6 +1295,11 @@ sub init_config {
$opt{'timeout'} = 0 if opt('timeout') < 0;
## parse an interval expression (such as '5m') into number of seconds
$opt{'daemon'} = interval(opt('daemon')) if defined($opt{'daemon'});
## make sure the interval isn't too short
$opt{'daemon'} = minimum('daemon') if opt('daemon') > 0 && opt('daemon') < minimum('daemon');
## define or modify host options specified on the command-line
if (exists $opt{'options'} && defined $opt{'options'}) {
## collect cmdline configuration options.