Hello everyone, everything good?
I'm facing an issue in hap ax2 - where the script doesn't work properly whereas in HAP ac2 it worked perfectly.
Here's the script:
https://gist.github.com/stargieg/1b11d3 ... e6c474d618
# Define User Variables
:global ddnspass "TOKEN"
:global ddnshost "HOSTNAME.dynv6.net"
#:global ddnspool "pool0"
#:global ddnsinterface "bridge"
#:global ddnsinterface "6to4-henet"
#:global ddnsinterface "pppoe-out1"
#:global ddnsinterface "ether1"
# Define Global Variables
:global ddnsip
:global ddnslastip
:if ([ :typeof $ddnslastip ] = nil ) do={ :global ddnslastip "0" }
# Define Local Variables
:local int
# Loop thru interfaces and look for ones containing
# default gateways without routing-marks
:if ([ :typeof $ddnsinterface ] != "str" ) do={
:foreach int in=[ /ipv6 address find global ] do={
:local testip [ /ipv6 address get $int address ]
:if ($testip in "fe80::/10" || $testip in "fc00::/7") do={
} else={
:global ddnsip $testip
}
}
} else={
:if ([ :typeof $ddnspool ] != "str" ) do={
# Grab the current Global IP address on that interface.
:foreach int in=[ /ipv6 address find interface=$ddnsinterface global ] do={
:local testip [ /ipv6 address get $int address ]
:if ($testip in "fe80::/10" || $testip in "fc00::/7") do={
} else={
:global ddnsip $testip
}
}
} else={
# Grab the current Global IP address on that interface from spec ip pool.
:global ddnsip [ /ipv6 address get [ /ipv6 address find interface=$ddnsinterface from-pool=$ddnspool ] address ]
}
}
# Did we get an IP address to compare?
:if ([ :typeof $ddnsip ] = nil ) do={
:log info ("DynDNS: No ip address present on please check.")
} else={
:log info ("DynDNS: check IPv6 UPDATE " . $ddnsip)
:if ($ddnsip != $ddnslastip) do={
:log info "DynDNS: Sending IPv6 UPDATE!"
:local str "api/update\?hostname=$ddnshost&ipv6=$ddnsip&token=$ddnspass"
/tool fetch address="dynv6.com" host="dynv6.com" src-path="$str" mode=https dst-path=("/dynv6.".$ddnshost)
:delay 1
:local str [/file find name="dynv6.$ddnshost"];
/file remove $str
:global ddnslastip $ddnsip
}
}
I performed some tests and apparently the error is in this part:
:local str "api/update\?hostname=$ddnshost&ipv6=$ddnsip&token=$ddnspass"
/tool fetch address="dynv6.com" host="dynv6.com" src-path="$str" mode=https dst-path=("/dynv6.".$ddnshost)
Is there any bug or adaptation for ARM64 architecture (hap ax2)?