mirror of
https://github.com/yavook/kiwi-backup.git
synced 2024-11-22 06:53:00 +00:00
Merge branch 'hotfix/0.10.1'
This commit is contained in:
commit
fff4d6de1f
3 changed files with 31 additions and 9 deletions
|
@ -25,11 +25,6 @@ fi
|
||||||
if [ -n "${GPG_KEY_ID}" ]; then
|
if [ -n "${GPG_KEY_ID}" ]; then
|
||||||
# gpg key given
|
# gpg key given
|
||||||
options_encryption="--encrypt-key=${GPG_KEY_ID}"
|
options_encryption="--encrypt-key=${GPG_KEY_ID}"
|
||||||
|
|
||||||
# handle more verbose "GPG_PASSPHRASE" env_var
|
|
||||||
PASSPHRASE="${GPG_PASSPHRASE:-${PASSPHRASE}}"
|
|
||||||
export PASSPHRASE
|
|
||||||
unset GPG_PASSPHRASE
|
|
||||||
else
|
else
|
||||||
# no key given
|
# no key given
|
||||||
options_encryption="--no-encryption"
|
options_encryption="--no-encryption"
|
||||||
|
|
27
libexec/kiwi-backup/run_command
Executable file
27
libexec/kiwi-backup/run_command
Executable 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" \
|
||||||
|
"${@}" \
|
||||||
|
)
|
|
@ -3,14 +3,14 @@
|
||||||
this_script="$( readlink -f "${0}" )"
|
this_script="$( readlink -f "${0}" )"
|
||||||
this_dir="${this_script%/*}"
|
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
|
| /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
|
| /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
|
| /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
|
| /usr/local/libexec/kiwi-cron/randomize_schedule
|
||||||
|
|
Loading…
Reference in a new issue