add restic self-update
This commit is contained in:
parent
7b242c65a6
commit
e08ed9a2ec
@ -10,6 +10,7 @@ restic_checksum: sha256:a88ca09d1dd051d470965667a224a2b81930c6628a0566b7b17868be
|
||||
restic_bin_path: /usr/local/bin
|
||||
restic_etc_path: /etc/restic
|
||||
restic_path: "{{ restic_bin_path }}/restic"
|
||||
restic_self_update: true
|
||||
|
||||
restic_global_exclude:
|
||||
- /dev
|
||||
|
@ -10,6 +10,11 @@ error_exit() {
|
||||
RESTIC_ETC_PATH=${RESTIC_ETC_PATH:-/etc/restic}
|
||||
RESTIC_PATH=${RESTIC_PATH:-/usr/local/bin/restic}
|
||||
|
||||
if [ "$RESTIC_SELF_UPDATE" -eq 1 ]; then
|
||||
printf "running restic self-update\n"
|
||||
$RESTIC_PATH self-update
|
||||
fi
|
||||
|
||||
# initial sleep
|
||||
MAX_ATTEMPTS=60
|
||||
MAX_SLEEP=43200 # 12 hours
|
||||
|
Loading…
Reference in New Issue
Block a user