main_part.include: fix a bug in the script error output.

This commit is contained in:
Christoph 2020-06-25 10:25:48 +02:00
parent 52f0e243c2
commit 2330f736f2

View File

@ -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