From 2330f736f2c5de5e10cca6baea200928a775a88a Mon Sep 17 00:00:00 2001 From: Christoph Date: Thu, 25 Jun 2020 10:25:48 +0200 Subject: [PATCH] main_part.include: fix a bug in the script error output. --- hosts/scripts/main_part.include | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hosts/scripts/main_part.include b/hosts/scripts/main_part.include index e16b208..dfb6ebd 100644 --- a/hosts/scripts/main_part.include +++ b/hosts/scripts/main_part.include @@ -291,7 +291,7 @@ if [ "$found" = "true" -o "$pgsql_backup" = "true" -o "$mysql_backup" = "true" echolog "\t${_val_arr[0]}: ${_val_arr[1]}" $ssh ${ssh_user}@${srcHost} "$sudo -u ${_val_arr[0]} ${_val_arr[1]}" > /dev/null 2> $err_Log if [[ "$?" -ne 0 ]]; then - $(cat "$err_Log") + echolog "\t[ERROR] Executing command failed.\n $(cat "$err_Log") fi done @@ -364,7 +364,7 @@ if [ "$found" = "true" -o "$pgsql_backup" = "true" -o "$mysql_backup" = "true" echolog "\t${_val_arr[0]}: ${_val_arr[1]}" $ssh ${ssh_user}@${srcHost} "$sudo -u ${_val_arr[0]} ${_val_arr[1]}" > /dev/null 2> $err_Log if [[ "$?" -ne 0 ]]; then - $(cat "$err_Log") + echolog "\t[ERROR] Executing command failed.\n $(cat "$err_Log") fi done