Merge pull request #258 from rhansen/fix-daemon

Fix `-daemon` command-line argument parsing
This commit is contained in:
Richard Hansen 2020-07-14 23:26:52 -04:00 committed by GitHub
commit da23769b68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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.