sh.zio.backup: remove dead code
parent
414f199766
commit
a9cfc4824b
|
@ -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() {
|
||||||
|
|
Loading…
Reference in New Issue