fix: preserve re-keyed ACME DNS account during seeding
continuous-integration/drone/push Build is failing

This commit is contained in:
notplants
2026-11-23 18:20:15 +00:00
parent 6c909be7df
commit 458227ffdb
+8
View File
@@ -68,6 +68,14 @@ let
src=/var/lib/acme/ci.commoninternet.net/acme-dns-accounts.json
dst=/var/lib/acme/ci.autonomic.zone/acme-dns-accounts.json
install -d -m 0700 /var/lib/acme/ci.autonomic.zone
# Preserve an existing account: it may have been re-keyed after DNS
# delegation. Re-seeding from the legacy zone would undo that change.
if [ -s "$dst" ] && jq -e "has(\"ci.autonomic.zone\")" "$dst" >/dev/null; then
chown acme:acme "$dst"
chmod 0600 "$dst"
echo "storage seed: existing account preserved"
exit 0
fi
if [ ! -s "$src" ]; then
echo "storage seed: no legacy accounts.json — skipping (fresh host?)"
exit 0