mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-03-30 05:41:48 +02:00
fix account command
backup file path generation should split the filename on the last dot instead of the first
This commit is contained in:
@@ -903,7 +903,7 @@ command_account() {
|
||||
echo "+ Account information was the same after the update"
|
||||
rm "${NEW_ACCOUNT_KEY_JSON}"
|
||||
else
|
||||
ACCOUNT_KEY_JSON_BACKUP="$(echo "${ACCOUNT_KEY_JSON}" | cut -d. -f1)-$(date +%s).json"
|
||||
ACCOUNT_KEY_JSON_BACKUP="${ACCOUNT_KEY_JSON%.*}-$(date +%s).json"
|
||||
echo "+ Backup ${ACCOUNT_KEY_JSON} as ${ACCOUNT_KEY_JSON_BACKUP}"
|
||||
cp -p "${ACCOUNT_KEY_JSON}" "${ACCOUNT_KEY_JSON_BACKUP}"
|
||||
echo "+ Populate ${ACCOUNT_KEY_JSON}"
|
||||
|
||||
Reference in New Issue
Block a user