Only log password if defined

This commit is contained in:
Andras Schmelczer 2024-06-02 11:43:02 +01:00
parent 25f16474d0
commit e8411ca6ea

View file

@ -4,15 +4,17 @@ echo "Starting backup wrapper script at `date`"
execute_script() {
echo "Executing script with:"
echo "BORG_PASSPHRASE=<redacted>"
if [ -n "$BORG_PASSPHRASE" ]; then
echo "BORG_PASSPHRASE=<redacted>"
fi
echo "BORG_REMOTE_PATH='${BORG_REMOTE_PATH}'"
echo "BORG_REPO='${BORG_REPO}'"
/src/backup.sh
}
configure_environment() {
local index=$1
local all_vars_set=true
# required variables
for var in BORG_PASSPHRASE BORG_REPO; do