fix(home-server): fix ddclient cmdv6

Use the first result to avoid using deprecated addresses.
This commit is contained in:
Felix Schröter 2023-03-14 13:40:07 +01:00
parent 01ed691523
commit 1cc2082832
Signed by: felschr
GPG key ID: 671E39E6744C807D

View file

@ -100,9 +100,9 @@ in with builtins; {
extraConfig = with pkgs; ''
usev6=cmdv6, cmdv6=${
pkgs.writeScript "get-ipv6" ''
${iproute2}/bin/ip --brief addr show enp2s0 mngtmpaddr \
| ${gawk}/bin/awk '{print $(NF)}' \
| sed 's/\/.*//'
${iproute2}/bin/ip -6 --brief addr show enp2s0 mngtmpaddr \
| ${gawk}/bin/awk '{print $3}' \
| cut -f1 -d'/'
''
}
usev4=disabled