diff --git a/Testing/test.sh b/Testing/test.sh index 93b3400..cdca2cc 100644 --- a/Testing/test.sh +++ b/Testing/test.sh @@ -160,7 +160,15 @@ if ! command -v final_message >/dev/null 2>&1; then fi # Print final message -final_message "$this_script_name" $success +final_message() { + local script_name=$1 + local success=$2 + if [[ $success -eq 0 ]]; then + log "${CHECK_MARK} $script_name completed successfully." + else + log "${CROSS_MARK} $script_name encountered errors." + fi +} # Exit with appropriate status exit $success \ No newline at end of file diff --git a/monitoring/monitoring.sh b/monitoring/monitoring.sh index 48b68dc..9690fc3 100644 --- a/monitoring/monitoring.sh +++ b/monitoring/monitoring.sh @@ -221,7 +221,15 @@ if ! command -v final_message >/dev/null 2>&1; then fi # Print final message -final_message "$this_script_name" $success +final_message() { + local script_name=$1 + local success=$2 + if [[ $success -eq 0 ]]; then + log "${CHECK_MARK} $script_name completed successfully." + else + log "${CROSS_MARK} $script_name encountered errors." + fi +} # Exit with appropriate status exit $success \ No newline at end of file