diff --git a/ct/dispatcharr.sh b/ct/dispatcharr.sh index fcf89f251..c656a9a4a 100644 --- a/ct/dispatcharr.sh +++ b/ct/dispatcharr.sh @@ -70,7 +70,7 @@ function update_script() { source /opt/dispatcharr/.env set +o allexport if [[ -n "$POSTGRES_DB" ]] && [[ -n "$POSTGRES_USER" ]] && [[ -n "$POSTGRES_PASSWORD" ]]; then - PGPASSWORD=$POSTGRES_PASSWORD pg_dump -U $POSTGRES_USER -h ${POSTGRES_HOST:-localhost} $POSTGRES_DB >/tmp/dispatcharr_db_$(date +%F).sql + PGPASSWORD=$POSTGRES_PASSWORD pg_dump -U "$POSTGRES_USER" -h "${POSTGRES_HOST:-localhost}" -p "${POSTGRES_PORT:-5432}" "$POSTGRES_DB" >/tmp/dispatcharr_db_$(date +%F).sql msg_info "Database backup created" fi fi