Merge pull request 'Preserve re-keyed ACME DNS account across renewal and boot' (#52) from fix/acme-preserve-account-20261123 into main
continuous-integration/drone/push Build is failing
continuous-integration/drone/push Build is failing
This commit was merged in pull request #52.
This commit is contained in:
@@ -68,6 +68,14 @@ let
|
|||||||
src=/var/lib/acme/ci.commoninternet.net/acme-dns-accounts.json
|
src=/var/lib/acme/ci.commoninternet.net/acme-dns-accounts.json
|
||||||
dst=/var/lib/acme/ci.autonomic.zone/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
|
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
|
if [ ! -s "$src" ]; then
|
||||||
echo "storage seed: no legacy accounts.json — skipping (fresh host?)"
|
echo "storage seed: no legacy accounts.json — skipping (fresh host?)"
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user