2
0
Fork 0

sh.zio.backup: remove dead code

main
Ducky 2024-04-01 21:55:53 +01:00
parent 414f199766
commit a9cfc4824b
1 changed files with 0 additions and 51 deletions

View File

@ -84,57 +84,6 @@ function invoke_restic() {
--password-file "$restic_repo_passwd_file" \ --password-file "$restic_repo_passwd_file" \
--repo "$(cat $restic_repo_file)" \ --repo "$(cat $restic_repo_file)" \
$command $args $command $args
#attempts=10
#attempts_delay=600
#while true; do
#set -o pipefail
#exec 3>&1
#function trigger_ntfy() {
# level="$1"
# title="$2"
# output="$3"
# /usr/local/bin/sh.zio.notify
# --invoked-by "sh.zio.backup" \
# --level "$level" \
# --message '```\\n'"${output//$'\n'/'\\n'}"'\\n```' \
# --title "Backup failed"
#}
#restic_out="$("$restic_path" \
# --cache-dir "$cache_dir" \
# --password-file "$restic_repo_passwd_file" \
# --repo "$(cat $restic_repo_file)" \
# $command $args 2>&1 | tee /dev/fd/3)"
#else
#say warning "Command failed."
#echo "$restic_out"
#/usr/local/bin/sh.zio.notify \
# --title "Backup failed" \
# --message '```\\n'"${restic_out//$'\n'/'\\n'}"'\\n```' \
# --level "warning" \
# --invoked-by "sh.zio.backup"
#trigger_ntfy "warning" "Backup failed: "
#break
#echo "---- THE OUTPUT: $restic_out"
#if [[ $attempts == 0 ]]; then
# say warning "Command failed. No attempts left"
# break
#else
# attempts=$((attempts - 1))
# say warning "Command failed. Trying again in $attempts_delay seconds ($attempts attempts remaining)..."
# sleep $attempts_delay
#fi
#fi
#set +o pipefail
#exec 3>&-
#done
#fi
} }
function invoke_script() { function invoke_script() {