From 571b21326c0955f52e2ca08849bbb250d6c9db6f Mon Sep 17 00:00:00 2001 From: Ducky Date: Wed, 2 Mar 2022 01:24:50 +0000 Subject: [PATCH] zio-backup: fix various runtime errors --- usr/local/bin/zio-backup | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr/local/bin/zio-backup b/usr/local/bin/zio-backup index 4ddc3e8..a864e43 100755 --- a/usr/local/bin/zio-backup +++ b/usr/local/bin/zio-backup @@ -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