Merge configs for the same hosts instead of using the last one
This commit is contained in:
parent
d3a353990b
commit
611b41e7a6
1 changed files with 8 additions and 3 deletions
11
ddclient.in
11
ddclient.in
|
@ -1639,9 +1639,14 @@ sub _read_config {
|
|||
|
||||
## allow {host} to be a comma separated list of hosts
|
||||
foreach my $h (split_by_comma($host)) {
|
||||
## save a copy of the current globals
|
||||
$config{$h} = { %locals };
|
||||
$config{$h}{'host'} = $h;
|
||||
if ($config{$h}) {
|
||||
## host already defined, merging configs
|
||||
$config{$h} = { %{merge($config{$h}, \%locals)} };
|
||||
} else {
|
||||
## save a copy of the current globals
|
||||
$config{$h} = { %locals };
|
||||
$config{$h}{'host'} = $h;
|
||||
}
|
||||
}
|
||||
}
|
||||
%passwords = ();
|
||||
|
|
Loading…
Reference in a new issue