diff --git a/borgmatic_setup.sh b/borgmatic_setup.sh index 449df07..c2566b5 100755 --- a/borgmatic_setup.sh +++ b/borgmatic_setup.sh @@ -840,9 +840,9 @@ if ! inf_follow "Checking for cronjob..." "\e[1;32mYes\e[0m" "\e[1;31mNo\e[0m" c fi fi -if [ -z $AUTO ]; then - if [ -z $FIRST_BACKUP ] && infp "Do you want to run the first backup now? [y/N]"; then - if ! inf_follow "Running first backup..." "\e[1;32mOK\e[0m" "\e[1;31mFAILED\e[0m" run_command /root/.local/pipx/venvs/borgmatic/bin/borgmatic create --verbosity 1 --list --stats; then +if [ $FIRST_BACKUP -eq 1 ]; then + if [ $AUTO -eq 1 ] || infp "Do you want to run the first backup now? [Y/n]"; then + if ! inf_follow "Running first backup (this may take a while!)..." "\e[1;32mOK\e[0m" "\e[1;31mFAILED\e[0m" run_command /root/.local/pipx/venvs/borgmatic/bin/borgmatic create --verbosity 1 --list --stats; then err "Failed to run first backup." err "If the error persists, please contact the support at $SCRIPT_SUPPORT." exit 1