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