oznu / docker-cloudflare-ddns

A small amd64/ARM/ARM64 Docker image that allows you to use CloudFlare as a DDNS / DynDNS Provider.
https://hub.docker.com/r/oznu/cloudflare-ddns/
GNU General Public License v3.0
1.08k stars 220 forks source link

Added support for ZONE_FILE #91

Closed devantler closed 2 years ago

devantler commented 2 years ago

I did this in the browser from a phone, and I have not been able to test it.

closes #90

devantler commented 2 years ago

I just had a second look at this issue. The problem is not solved by my PR.

The issue is here:

getZoneId() {
  cloudflare "$CF_API/zones?name=$ZONE" | jq -r '.result[0].id'
}

Even though ZONE is initialised with ZONE_FILE in 30-cloudflare-setup.sh it does not hold the value when it used in the getZoneId method in the cloudflare.sh script.

I am not so familiar with shell scripts but I think it might be solvable by passing the ZONE variable from the method call in 30-cloudflar-setup.sh such that we get the variable that holds the ZONE value when using ZONE_FILE.

I am closing this PR as it is not helpful, and changing the issue description in #90 to match with my new findings