Direct prompt for remote Transmission in main installer

- Move the remote Transmission prompt to main installer before config module is called
- Modify config module to use the already-set TRANSMISSION_REMOTE variable
- Remove existing logic in config module that was causing issues
- Clean up environment variables when invoking installer from bootstrap
- Remove emergency fallback since we now handle it in the right order

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-03-05 08:52:46 +00:00
parent d2babeba27
commit 1795373b42
4 changed files with 30 additions and 34 deletions

View File

@@ -133,15 +133,28 @@ if [ "$IS_UPDATE" = true ]; then
else
# This is a fresh installation - run all steps
# Step 1: Gather configuration from user
log "INFO" "Gathering configuration..."
# Explicitly run this to ensure it's called before dependencies
set +e # Temporarily disable exit on error
if ! gather_configuration; then
# Step 1: First, let's directly ask about Transmission
# This is a direct approach that bypasses any potential sourcing issues
log "INFO" "Configuring Transmission connection..."
echo -e "${BOLD}Transmission Configuration:${NC}"
echo -e "Configure connection to your Transmission client:"
echo
read -p "Is Transmission running on a remote server? (y/n) [n]: " input_remote
if [[ $input_remote =~ ^[Yy]$ ]]; then
export TRANSMISSION_REMOTE=true
log "INFO" "Remote Transmission selected."
else
export TRANSMISSION_REMOTE=false
log "INFO" "Local Transmission selected."
fi
# Now gather the rest of the configuration
log "INFO" "Gathering remaining configuration..."
gather_configuration || {
log "ERROR" "Configuration gathering failed"
exit 1
fi
set -e # Re-enable exit on error
}
# Debug: Verify TRANSMISSION_REMOTE is set
log "INFO" "After configuration gathering, TRANSMISSION_REMOTE=$TRANSMISSION_REMOTE"