Fixed --first-backup not working

This commit is contained in:
Enrico Ludwig 2024-05-13 12:57:10 +02:00
parent ef25e70b59
commit 14122a7fd7

View File

@ -840,9 +840,9 @@ if ! inf_follow "Checking for cronjob..." "\e[1;32mYes\e[0m" "\e[1;31mNo\e[0m" c
fi fi
fi fi
if [ -z $AUTO ]; then if [ $FIRST_BACKUP -eq 1 ]; then
if [ -z $FIRST_BACKUP ] && infp "Do you want to run the first backup now? [y/N]"; then if [ $AUTO -eq 1 ] || 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 ! 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 "Failed to run first backup."
err "If the error persists, please contact the support at $SCRIPT_SUPPORT." err "If the error persists, please contact the support at $SCRIPT_SUPPORT."
exit 1 exit 1