add restic self-update

This commit is contained in:
Ryan Cavicchioni 2020-04-20 22:28:21 -05:00
parent 7b242c65a6
commit e08ed9a2ec
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D
2 changed files with 6 additions and 0 deletions

View File

@ -10,6 +10,7 @@ restic_checksum: sha256:a88ca09d1dd051d470965667a224a2b81930c6628a0566b7b17868be
restic_bin_path: /usr/local/bin restic_bin_path: /usr/local/bin
restic_etc_path: /etc/restic restic_etc_path: /etc/restic
restic_path: "{{ restic_bin_path }}/restic" restic_path: "{{ restic_bin_path }}/restic"
restic_self_update: true
restic_global_exclude: restic_global_exclude:
- /dev - /dev

View File

@ -10,6 +10,11 @@ error_exit() {
RESTIC_ETC_PATH=${RESTIC_ETC_PATH:-/etc/restic} RESTIC_ETC_PATH=${RESTIC_ETC_PATH:-/etc/restic}
RESTIC_PATH=${RESTIC_PATH:-/usr/local/bin/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 # initial sleep
MAX_ATTEMPTS=60 MAX_ATTEMPTS=60
MAX_SLEEP=43200 # 12 hours MAX_SLEEP=43200 # 12 hours