From a1a99930a860d94b0e35ec9ee640945dab926b55 Mon Sep 17 00:00:00 2001 From: snaki Date: Thu, 7 Jul 2022 14:59:59 +0200 Subject: [PATCH] minor fixes --- btrbk | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/btrbk b/btrbk index f9e203d..3d79573 100755 --- a/btrbk +++ b/btrbk @@ -10,7 +10,7 @@ function bkRun { for i in ${!SUBVOLS[@]}; do snapName=${VOLNAME[$i]}.$date getSnap "$i" - if [[ -d "$SNAPDIR$snapName" ]] && ! $force; then + if [[ -d "$SNAPDIR$snapName" && "$force" != true ]]; then echo "backup already run today" continue else @@ -115,9 +115,9 @@ function testConf { fi if rclone ls $RCLONEDIR > /dev/null 2>&1; then if gpg --list-key $PUBKEY > /dev/null 2>&1; then - if $restore; then + if [ "$restore" = true ]; then runRestore - elif $backup; then + elif [ "$backup" = true ]; then testDate fi else @@ -172,8 +172,10 @@ while true; do esac shift done -if $fullRestore; then +if [ "$fullBackup" = true ]; then runFullRestore -elif $backup +elif [ "$backup" = true ]; then testConf +else + echoHelp fi