Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions net/ddns-scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=ddns-scripts
PKG_VERSION:=2.8.4
PKG_RELEASE:=4
PKG_VERSION:=2.8.5
PKG_RELEASE:=1

PKG_LICENSE:=GPL-2.0

Expand Down
23 changes: 16 additions & 7 deletions net/ddns-scripts/files/usr/lib/ddns/update_netcup_com.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ __NETCUP_ENDPOINT="https://ccp.netcup.net/run/webservice/servers/endpoint.php?JS
[ -z "$param_enc" ] && write_log 14 "netcup DDNS: 'param_enc' (API key) not set"
[ -z "$domain" ] && write_log 14 "netcup DDNS: 'domain' (subdomain to update) not set"
[ -z "$__IP" ] && write_log 14 "netcup DDNS: __IP (current IP) not set by the framework"
[ -z "$REGISTERED_IP" ] && write_log 14 "netcup DDNS: REGISTERED_IP not set by the framework"

# Require an HTTPS-capable client — the netcup endpoint is HTTPS only.
[ -z "$CURL_SSL" ] && [ -z "$WGET_SSL" ] && \
Expand Down Expand Up @@ -215,12 +214,22 @@ for __key in $__RECORD_KEYS; do

write_log 7 "netcup DDNS: examining record id=$__rec_id '$__rec_name' [$__rec_type] = '$__rec_destination'"

if [ "$__rec_type" = "$__RRTYPE" ] \
&& [ "$__rec_name" = "$__REC_HOSTNAME" ] \
&& [ "$__rec_destination" = "$REGISTERED_IP" ]; then
__MATCH_ID="$__rec_id"
write_log 7 "netcup DDNS: matched record id=$__MATCH_ID"
break
if [ "$__rec_type" = "$__RRTYPE" ]; then
# compare hostname only if type already matches
if [ "$__rec_name" = "$__REC_HOSTNAME" ]; then
# compare ip's
__rec_cmp="$__rec_destination"
[ "$__RRTYPE" = "AAAA" ] && expand_ipv6 "$__rec_destination" __rec_cmp
if [ "$__rec_cmp" != "$__IP" ]; then
Comment thread
beedaddy marked this conversation as resolved.
__MATCH_ID="$__rec_id"
write_log 7 "netcup DDNS: need update for record id='$__MATCH_ID'"
break
else
json_cleanup
write_log 6 "netcup DDNS: no update required for host '$__REC_HOSTNAME'"
return 0
fi
fi
fi
done

Expand Down