Fixed config is being generated even though it should be skipped
This commit is contained in:
parent
792b0922dd
commit
df7106a956
@ -69,7 +69,7 @@ SKIP_CONFIG=0 # Set to 1 to skip the borgmatic configuration
|
|||||||
readonly SCRIPT_NAME="Borgmatic Backup Setup Tool"
|
readonly SCRIPT_NAME="Borgmatic Backup Setup Tool"
|
||||||
readonly SCRIPT_AUTHOR="Zion Networks at admin@zion-networks.de"
|
readonly SCRIPT_AUTHOR="Zion Networks at admin@zion-networks.de"
|
||||||
readonly SCRIPT_SUPPORT="admin@zion-networks.de"
|
readonly SCRIPT_SUPPORT="admin@zion-networks.de"
|
||||||
readonly VERSION="1.2.2"
|
readonly VERSION="1.2.3"
|
||||||
|
|
||||||
# logging functions
|
# logging functions
|
||||||
function inf {
|
function inf {
|
||||||
@ -915,6 +915,8 @@ elif [ -f $BORGMATIC_CONFIG_FILE ] && [ $OVERRIDE_CONFIG -eq 1 ]; then
|
|||||||
wrn "Existing borgmatic configuration file will be overridden!"
|
wrn "Existing borgmatic configuration file will be overridden!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $SKIP_CONFIG -eq 0 ]; then
|
||||||
|
|
||||||
cat > $BORGMATIC_CONFIG_FILE <<EOF
|
cat > $BORGMATIC_CONFIG_FILE <<EOF
|
||||||
|
|
||||||
ssh_command: ssh -i $SSH_KEY_FILE -p $SSH_PORT
|
ssh_command: ssh -i $SSH_KEY_FILE -p $SSH_PORT
|
||||||
@ -945,6 +947,7 @@ else
|
|||||||
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
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if ! inf_follow "Validating borgmatic configuration..." "\e[1;32mOK\e[0m" "\e[1;31mFAILED\e[0m" run_command /root/.local/pipx/venvs/borgmatic/bin/borgmatic config validate; then
|
if ! inf_follow "Validating borgmatic configuration..." "\e[1;32mOK\e[0m" "\e[1;31mFAILED\e[0m" run_command /root/.local/pipx/venvs/borgmatic/bin/borgmatic config validate; then
|
||||||
err "Validation of borgmatic configuration failed."
|
err "Validation of borgmatic configuration failed."
|
||||||
|
Reference in New Issue
Block a user