Skip to content

Commit b70c6d4

Browse files
authored
Merge pull request #22 from supernetes/fix-ddns-expiry
fix: properly handle expiring DDNS records
2 parents 2981c4d + fdec15f commit b70c6d4

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

work/ddclient.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ spec:
2020
- -xec
2121
- |
2222
apk --no-cache add ddclient
23+
24+
# Some DDNS providers, such as dy.fi, have a 7-day expiration for DDNS records if they're not updated,
25+
# even if the associated IP hasn't changed. ddclient isn't smart enough to figure that out, so remove
26+
# its cache every 5 days to force it to perform an update and keep the record alive.
27+
remove_cache() {
28+
while sleep 5d; do
29+
rm -f /var/cache/ddclient/ddclient.cache
30+
done
31+
}
32+
33+
remove_cache &
2334
exec ddclient -foreground -file /config/ddclient.conf
2435
securityContext:
2536
privileged: false

0 commit comments

Comments
 (0)