1
0
Fork 0
mirror of https://github.com/yavook/kiwi-backup.git synced 2024-11-22 06:53:00 +00:00

Merge tag 'v0.10.1' into develop

bug: secrets handling in 0.10.0
This commit is contained in:
Jörn-Michael Miehe 2022-03-03 11:59:24 +01:00
commit 838664f085
3 changed files with 31 additions and 9 deletions

View file

@ -25,11 +25,6 @@ fi
if [ -n "${GPG_KEY_ID}" ]; then
# gpg key given
options_encryption="--encrypt-key=${GPG_KEY_ID}"
# handle more verbose "GPG_PASSPHRASE" env_var
PASSPHRASE="${GPG_PASSPHRASE:-${PASSPHRASE}}"
export PASSPHRASE
unset GPG_PASSPHRASE
else
# no key given
options_encryption="--no-encryption"

27
libexec/kiwi-backup/run_command Executable file
View file

@ -0,0 +1,27 @@
#!/bin/sh
this_script="$( readlink -f "${0}" )"
this_dir="${this_script%/*}"
# files
duplicity_secrets_file="/root/duplicity_secrets"
# load secrets file
if [ -f "${duplicity_secrets_file}" ]; then
# shellcheck disable=SC1090
. "${duplicity_secrets_file}"
fi
# handle more verbose "GPG_PASSPHRASE" env var
if [ -n "${GPG_PASSPHRASE}" ]; then
PASSPHRASE="${GPG_PASSPHRASE:-${PASSPHRASE}}"
export PASSPHRASE
unset GPG_PASSPHRASE
fi
# hand over
set -ex
exec $( \
"${this_dir}/build_command" \
"${@}" \
)

View file

@ -3,14 +3,14 @@
this_script="$( readlink -f "${0}" )"
this_dir="${this_script%/*}"
echo "${SCHEDULE_BACKUP}" "$( "${this_dir}/build_command" backup )" \
echo "${SCHEDULE_BACKUP}" "${this_dir}/run_command backup" \
| /usr/local/libexec/kiwi-cron/randomize_schedule
echo "${SCHEDULE_CLEANUP}" "$( "${this_dir}/build_command" cleanup )" \
echo "${SCHEDULE_CLEANUP}" "${this_dir}/run_command cleanup" \
| /usr/local/libexec/kiwi-cron/randomize_schedule
echo "${SCHEDULE_RMFULL}" "$( "${this_dir}/build_command" rmfull )" \
echo "${SCHEDULE_RMFULL}" "${this_dir}/run_command rmfull" \
| /usr/local/libexec/kiwi-cron/randomize_schedule
echo "${SCHEDULE_RMINCR}" "$( "${this_dir}/build_command" rmincr )" \
echo "${SCHEDULE_RMINCR}" "${this_dir}/run_command rmincr" \
| /usr/local/libexec/kiwi-cron/randomize_schedule