fix: Change INSTALL_PREFIX placeholder notation to templating notation (#131)
* refactor: Change INSTALL_PREFIX placeholder notation to templating notation
The former shell notation `$INSTALL_PREFIX` could result confusing. As
this is a placeholder that's replaced in the `make`, we switch it to a
template notation `{{ INSTALL_PREFIX }}`.
* docs: Small fix on README/manual setup
* docs(email-notif): Document the `{{ INSTALL_PREFIX }}` placeholder
co-authored-by: giuaig <13609224+giuaig@users.noreply.github.com>
* Update README.md
Co-authored-by: Gerard Bosch <30733556+gerardbosch@users.noreply.github.com>
---------
Co-authored-by: giuaig <13609224+giuaig@users.noreply.github.com>
Co-authored-by: Erik Westrup <erik.westrup@icloud.com>
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
SHELL=/bin/sh
|
||||
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin/:$INSTALL_PREFIX/bin/
|
||||
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin/:{{ INSTALL_PREFIX }}/bin/
|
||||
# Order of crontab fields
|
||||
# minute hour mday month wday command
|
||||
# Reference: https://www.freebsd.org/doc/handbook/configtuning-cron.html
|
||||
# Reference: crontab(5).
|
||||
|
||||
@midnight root . $INSTALL_PREFIX/etc/restic/default.env.sh && restic_backup.sh
|
||||
@monthly root . $INSTALL_PREFIX/etc/restic/default.env.sh && restic_check.sh
|
||||
@midnight root . {{ INSTALL_PREFIX }}/etc/restic/default.env.sh && restic_backup.sh
|
||||
@monthly root . {{ INSTALL_PREFIX }}/etc/restic/default.env.sh && restic_check.sh
|
||||
|
||||
# Email notification version. Make sure bin/cron_mail is in the above $PATH
|
||||
#@midnight root . $INSTALL_PREFIX/etc/restic/default.env.sh && cron_mail restic_backup.sh
|
||||
#@monthly root . $INSTALL_PREFIX/etc/restic/default.env.sh && cron_mail restic_check.sh
|
||||
#@midnight root . {{ INSTALL_PREFIX }}/etc/restic/default.env.sh && cron_mail restic_backup.sh
|
||||
#@monthly root . {{ INSTALL_PREFIX }}/etc/restic/default.env.sh && cron_mail restic_check.sh
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
|
||||
|
||||
# The restic repository encryption key
|
||||
export RESTIC_PASSWORD_FILE="$INSTALL_PREFIX/etc/restic/pw.txt"
|
||||
export RESTIC_PASSWORD_FILE="{{ INSTALL_PREFIX }}/etc/restic/pw.txt"
|
||||
# The global restic exclude file
|
||||
export RESTIC_BACKUP_EXCLUDE_FILE="$INSTALL_PREFIX/etc/restic/backup_exclude.txt"
|
||||
export RESTIC_BACKUP_EXCLUDE_FILE="{{ INSTALL_PREFIX }}/etc/restic/backup_exclude.txt"
|
||||
|
||||
# Backblaze B2 credentials keyID & applicationKey pair.
|
||||
# Restic environment variables are documented at https://restic.readthedocs.io/en/latest/040_backup.html#environment-variables
|
||||
@@ -31,7 +31,7 @@ export RESTIC_BACKUP_EXTRA_ARGS=
|
||||
export RESTIC_VERBOSITY_LEVEL=0
|
||||
|
||||
# (optional, uncomment to enable) Backup summary stats log: snapshot size, etc. (empty/unset won't log)
|
||||
#export RESTIC_BACKUP_STATS_DIR="$INSTALL_PREFIX/var/log/restic-automatic-backup-scheduler"
|
||||
#export RESTIC_BACKUP_STATS_DIR="{{ INSTALL_PREFIX }}/var/log/restic-automatic-backup-scheduler"
|
||||
|
||||
# (optional) Desktop notifications. See README and restic_backup.sh for details on how to set this up (empty/unset means disabled)
|
||||
export RESTIC_BACKUP_NOTIFICATION_FILE=
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# $ restic --repo ... --password-file ...
|
||||
|
||||
# shellcheck source=etc/restic/_global.env.sh
|
||||
. "$INSTALL_PREFIX/etc/restic/_global.env.sh"
|
||||
. "{{ INSTALL_PREFIX }}/etc/restic/_global.env.sh"
|
||||
|
||||
# Envvars below will override those in _global.env.sh if present.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user