Merge pull request #515 from tduboys/merge_config
Merge configs for the same hosts instead of using the last one
This commit is contained in:
commit
407f0c6350
3 changed files with 10 additions and 4 deletions
|
@ -25,6 +25,8 @@ repository history](https://github.com/ddclient/ddclient/commits/master).
|
||||||
|
|
||||||
* DynDNS2 now uses the newer ipv4/ipv6 syntax's
|
* DynDNS2 now uses the newer ipv4/ipv6 syntax's
|
||||||
* The OVH provider now ignores extra data returned
|
* The OVH provider now ignores extra data returned
|
||||||
|
* Allow to define usev4 and usev6 options per hostname
|
||||||
|
* Merge multiple configs for the same hostname instead of use the last
|
||||||
|
|
||||||
## 2022-10-20 v3.10.0
|
## 2022-10-20 v3.10.0
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@ EXTRA_DIST = \
|
||||||
ChangeLog.md \
|
ChangeLog.md \
|
||||||
README.cisco \
|
README.cisco \
|
||||||
README.md \
|
README.md \
|
||||||
README.ssl \
|
|
||||||
autogen \
|
autogen \
|
||||||
sample-ddclient-wrapper.sh \
|
sample-ddclient-wrapper.sh \
|
||||||
sample-etc_cron.d_ddclient \
|
sample-etc_cron.d_ddclient \
|
||||||
|
|
|
@ -1639,11 +1639,16 @@ sub _read_config {
|
||||||
|
|
||||||
## allow {host} to be a comma separated list of hosts
|
## allow {host} to be a comma separated list of hosts
|
||||||
foreach my $h (split_by_comma($host)) {
|
foreach my $h (split_by_comma($host)) {
|
||||||
|
if ($config{$h}) {
|
||||||
|
## host already defined, merging configs
|
||||||
|
$config{$h} = { %{merge($config{$h}, \%locals)} };
|
||||||
|
} else {
|
||||||
## save a copy of the current globals
|
## save a copy of the current globals
|
||||||
$config{$h} = { %locals };
|
$config{$h} = { %locals };
|
||||||
$config{$h}{'host'} = $h;
|
$config{$h}{'host'} = $h;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
%passwords = ();
|
%passwords = ();
|
||||||
}
|
}
|
||||||
close(FD);
|
close(FD);
|
||||||
|
|
Loading…
Reference in a new issue