mirror of
https://github.com/tiredofit/docker-db-backup.git
synced 2025-12-21 21:33:28 +01:00
fix - Optimize generating checksum routines
This commit is contained in:
@@ -693,8 +693,7 @@ generate_checksum() {
|
||||
cd "${TEMP_LOCATION}"
|
||||
run_as_user ${checksum_command} "${target}" | run_as_user tee "${target}"."${checksum_extension}" > /dev/null
|
||||
chmod ${DB_DUMP_TARGET_PERMISSION} "${target}"."${checksum_extension}"
|
||||
## TODO - We're doing this twice, why not just pull from the previously generated file
|
||||
checksum_value=$(run_as_user ${checksum_command} "${target}" | awk ' { print $1}')
|
||||
checksum_value=$(run_as_user cat "${target}"."${checksum_extension}" | awk '{print $1}')
|
||||
print_debug "${checksum_extension^^}: ${checksum_value} - ${target}"
|
||||
else
|
||||
print_error "Skipping Checksum creation because backup did not complete successfully"
|
||||
|
||||
Reference in New Issue
Block a user