Preserve re-keyed ACME DNS account across renewal and boot #52
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user