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:
@@ -116,12 +116,11 @@ function gather_configuration() {
|
||||
echo -e "Configure connection to your Transmission client:"
|
||||
echo
|
||||
|
||||
# Ask if Transmission is remote
|
||||
read -p "Is Transmission running on a remote server? (y/n) [n]: " input_remote
|
||||
if [[ $input_remote =~ ^[Yy]$ ]]; then
|
||||
TRANSMISSION_REMOTE=true
|
||||
export TRANSMISSION_REMOTE=true
|
||||
|
||||
# Don't ask about remote again - this is now handled in the main installer
|
||||
# Just log the current setting for clarity
|
||||
log "INFO" "Using previously selected Transmission mode: $([ "$TRANSMISSION_REMOTE" = true ] && echo "Remote" || echo "Local")"
|
||||
|
||||
if [ "$TRANSMISSION_REMOTE" = true ]; then
|
||||
# Get and validate hostname
|
||||
while true; do
|
||||
read -p "Remote Transmission host [localhost]: " input_trans_host
|
||||
@@ -233,9 +232,7 @@ function gather_configuration() {
|
||||
# Set Transmission download dir for configuration
|
||||
TRANSMISSION_DOWNLOAD_DIR=$REMOTE_DOWNLOAD_DIR
|
||||
else
|
||||
# Local Transmission selected
|
||||
TRANSMISSION_REMOTE=false
|
||||
export TRANSMISSION_REMOTE=false
|
||||
# Local Transmission selected - this part was already set in main-installer.sh
|
||||
|
||||
echo -e "${YELLOW}You've selected to use a local Transmission installation.${NC}"
|
||||
|
||||
|
||||
@@ -13,23 +13,8 @@ function install_dependencies() {
|
||||
|
||||
log "INFO" "Transmission mode: $([ "$TRANSMISSION_REMOTE" = true ] && echo "Remote" || echo "Local")"
|
||||
|
||||
# Debug: print out whether the gather_configuration was called
|
||||
if [ "$IS_UPDATE" != true ]; then
|
||||
if [ -z "$CONFIG_GATHERED" ]; then
|
||||
log "ERROR" "Configuration step was skipped! This is a bug."
|
||||
log "INFO" "Please report this issue. Will now manually ask about Transmission location."
|
||||
|
||||
# Emergency fix: Ask about remote installation here
|
||||
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
|
||||
fi
|
||||
fi
|
||||
# Log transmission mode
|
||||
log "INFO" "Proceeding with Transmission mode: $([ "$TRANSMISSION_REMOTE" = true ] && echo "Remote" || echo "Local")"
|
||||
|
||||
# Check for package manager
|
||||
if command -v apt-get &> /dev/null; then
|
||||
|
||||
Reference in New Issue
Block a user