Fix misuse of define()
This commit is contained in:
parent
7fa1beb11e
commit
1c13c24981
1 changed files with 5 additions and 3 deletions
8
ddclient
8
ddclient
|
@ -1291,9 +1291,11 @@ sub init_config {
|
|||
$opt{'quiet'} = 0 if opt('verbose');
|
||||
|
||||
## infer the IP strategy if possible
|
||||
$opt{'use'} = 'ip' if !define($opt{'use'}) && defined($opt{'ip'});
|
||||
$opt{'use'} = 'if' if !define($opt{'use'}) && defined($opt{'if'});
|
||||
$opt{'use'} = 'web' if !define($opt{'use'}) && defined($opt{'web'});
|
||||
if (!defined($opt{'use'})) {
|
||||
$opt{'use'} = 'ip' if defined($opt{'ip'});
|
||||
$opt{'use'} = 'if' if defined($opt{'if'});
|
||||
$opt{'use'} = 'web' if defined($opt{'web'});
|
||||
}
|
||||
|
||||
## sanity check
|
||||
$opt{'max-interval'} = min(interval(opt('max-interval')), interval(default('max-interval')));
|
||||
|
|
Loading…
Reference in a new issue