diff --git a/usr/local/bin/sh.zio.backup b/usr/local/bin/sh.zio.backup index 0d4e9ca..8eb6145 100755 --- a/usr/local/bin/sh.zio.backup +++ b/usr/local/bin/sh.zio.backup @@ -127,10 +127,15 @@ function invoke_script() { set -o pipefail exec 3>&1 + log_header="$me_filename $backup_script" + log_header_length="${#log_header}" + + script_log_path="$(create_log "$log_header\n$(repeat "-" $log_header_length)\n")" script_error_log_path="$(create_tmp_file)" + script_output=$("$backup_scripts_dir/$backup_script_filename" 2>$script_error_log_path | tee /dev/fd/3) + echo -e "$script_output" >> "$script_log_path" script_result="$?" - script_log_path="$(create_log "$script_output")" if [[ -f "$script_error_log_path" ]]; then cat "$script_error_log_path"