diff --git a/borg_backup.sh b/borg_backup.sh index a08c7e2..ef9159e 100755 --- a/borg_backup.sh +++ b/borg_backup.sh @@ -44,7 +44,8 @@ touch "$cache_file" BORG_REPO=ssh://flyingscorpio@2px.info:22/~/"$(hostname)".borg export BORG_REPO -export BORG_PASSPHRASE='ribosome66' +BORG_PASSPHRASE="$BORG_PASSPHRASE" +export BORG_PASSPHRASE # some helpers and error handling: info() { printf "\n%s %s\n\n" "$(date)" "$*" >&2; } diff --git a/pacman_hooks/borg_backup.hook b/pacman_hooks/borg_backup.hook index cb34793..9dc92df 100644 --- a/pacman_hooks/borg_backup.hook +++ b/pacman_hooks/borg_backup.hook @@ -8,5 +8,5 @@ Target = * [Action] Description = Borg backup When = PreTransaction -Exec = /home/flyingscorpio/SetupCockpit/borg_backup.sh +Exec = source /home/flyingscorpio/SetupCockpit/secrets && /home/flyingscorpio/SetupCockpit/borg_backup.sh Depends = borg diff --git a/secrets.template b/secrets.template index 00cce75..02f52fe 100644 --- a/secrets.template +++ b/secrets.template @@ -1,3 +1,4 @@ # secrets - is sourced by some commands - this is a template SETUP_COCKPIT_EMAIL='' +BORG_PASSPHRASE=''