update-account: persist the new email into the CA conf
"--update-account -m new@example.com" updated the contact on the CA but never saved it locally, so CA_EMAIL kept showing the old address on every later run. Save it in the success path like _regAccount does. https://github.com/acmesh-official/acme.sh/issues/4673
This commit is contained in:
@@ -4179,6 +4179,12 @@ updateaccount() {
|
||||
if [ "$code" = '200' ]; then
|
||||
echo "$response" >"$ACCOUNT_JSON_PATH"
|
||||
_info "Account update success for $_accUri."
|
||||
# persist the effective mailbox like _regAccount does; otherwise
|
||||
# "--update-account -m new@..." updates the CA but the local conf
|
||||
# keeps showing the old address (issue 4673)
|
||||
if [ "$_email" ]; then
|
||||
_savecaconf "CA_EMAIL" "$_email"
|
||||
fi
|
||||
|
||||
ACCOUNT_THUMBPRINT="$(__calc_account_thumbprint)"
|
||||
_info "ACCOUNT_THUMBPRINT" "$ACCOUNT_THUMBPRINT"
|
||||
|
||||
Reference in New Issue
Block a user