From e03fefeb02650ac3ad1969bb39f7fbcc3ac78eaa Mon Sep 17 00:00:00 2001 From: Dave Conroy Date: Wed, 1 Nov 2023 14:34:34 -0700 Subject: [PATCH] fix - Optimize generating checksum routines --- install/assets/functions/10-db-backup | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/assets/functions/10-db-backup b/install/assets/functions/10-db-backup index b6ed680..f0e7208 100644 --- a/install/assets/functions/10-db-backup +++ b/install/assets/functions/10-db-backup @@ -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"