sh.zio.backup: add header to logfile
parent
5bf4386a53
commit
c542314200
|
@ -127,10 +127,15 @@ function invoke_script() {
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
exec 3>&1
|
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_error_log_path="$(create_tmp_file)"
|
||||||
|
|
||||||
script_output=$("$backup_scripts_dir/$backup_script_filename" 2>$script_error_log_path | tee /dev/fd/3)
|
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_result="$?"
|
||||||
script_log_path="$(create_log "$script_output")"
|
|
||||||
|
|
||||||
if [[ -f "$script_error_log_path" ]]; then
|
if [[ -f "$script_error_log_path" ]]; then
|
||||||
cat "$script_error_log_path"
|
cat "$script_error_log_path"
|
||||||
|
|
Loading…
Reference in New Issue