2
0
Fork 0

zio-backup: fix various runtime errors

main
Ducky 2022-03-02 01:24:50 +00:00
parent 1d01e9efa7
commit 571b21326c
1 changed files with 4 additions and 4 deletions

View File

@ -4,7 +4,7 @@ env_dir=$1
base_dir="$(dirname "$(realpath -s "$0")")"
root_dir="$base_dir/../../.."
[[ -z $env_dir ]] && env_dir="/etc/zio/backup/"
[[ -z $env_dir ]] && env_dir="/etc/zio/backup"
function restic_exec() {
command="$1"
@ -151,7 +151,7 @@ fi
if [[ -z $b2_account_id ]]; then
say_die "B2_ACCOUNT_ID (in $env_dir/config) not set. Aborting..."
else
export B2_ACCOUNT_ID="$b2_account_ID"
export B2_ACCOUNT_ID="$b2_account_id"
fi
if [[ -z $b2_account_key ]]; then
@ -160,7 +160,7 @@ else
export B2_ACCOUNT_KEY="$b2_account_key"
fi
if [[ ! -f $pre_script_file ]]; then
if [[ -f $pre_script_file ]]; then
say_do "Executing pre-backup script..."
. $pre_script_file
fi
@ -183,7 +183,7 @@ do
systemctl start $service
done
if [[ ! -z $post_script_file ]]; then
if [[ -f $post_script_file ]]; then
say_do "Executing post-backup script..."
. $post_script_file
fi