From a9cfc4824bccd3f82d27ede293724772fb740b4a Mon Sep 17 00:00:00 2001 From: Ducky Date: Mon, 1 Apr 2024 21:55:53 +0100 Subject: [PATCH] sh.zio.backup: remove dead code --- usr/local/bin/sh.zio.backup | 51 ------------------------------------- 1 file changed, 51 deletions(-) diff --git a/usr/local/bin/sh.zio.backup b/usr/local/bin/sh.zio.backup index 9f9cd8d..6d83727 100755 --- a/usr/local/bin/sh.zio.backup +++ b/usr/local/bin/sh.zio.backup @@ -84,57 +84,6 @@ function invoke_restic() { --password-file "$restic_repo_passwd_file" \ --repo "$(cat $restic_repo_file)" \ $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() {