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