joshuaavalon/SynologyCloudflareDDNS

[Bug] <a little bug>

Closed this issue · 5 comments

line 17 ip6fetch=$(ip -6 addr show eth0 | grep -oP "$ipv6Regex")
Modify to ip6fetch=$(ip -6 addr show ovs_eth0 | grep -oP "$ipv6Regex")

Can you submit a pull request?

在多网口 并做了桥接的时候 改为ovs_eth0 脚本能正常工作,不改就一直提示 未知的错误

I'm experiencing a bug related to this line as well.

https://github.com/joshuaavalon/SynologyCloudflareDDNS/blob/dbab09dd59893c89aeca29050ecaacf92cc96409/cloudflareddns.sh#L18C13-L18C33

In my case, I don't have an IPv6 addresses assigned to the Synology. So as such (no matter what interface is checked) the check for IPv6 (and subsequent grep) will fail. This is important because that produces return code 1 (error) instead of return code 0. And given that set -e is being used - the script will terminate if anything encounters code 1.

https://github.com/joshuaavalon/SynologyCloudflareDDNS/blob/master/cloudflareddns.sh#L2

I have the same issue as mallardduck. Created PR#28 to fix the unexpected script termination.

Merged #28