Fix input handling for remote Transmission selection

- Add debug logging to track input values
- Replace regex matching with direct string comparison for better reliability
- Add explicit checks for 'y' and 'Y' input values
- This fixes an issue where remote mode wasn't correctly detected from user input
This commit is contained in:
MasterDraco 2025-03-05 09:58:50 +00:00
parent 8af47ed35c
commit 4e4fd09811
2 changed files with 8 additions and 3 deletions

View File

@ -1174,8 +1174,9 @@ echo -e "Configure connection to your Transmission client:"
echo echo
read -p "Is Transmission running on a remote server? (y/n) [n]: " input_remote read -p "Is Transmission running on a remote server? (y/n) [n]: " input_remote
echo "DEBUG: Input received for remote in install-script.sh: '$input_remote'"
# Explicitly check for "y" or "Y" response # Explicitly check for "y" or "Y" response
if [[ "$input_remote" == "y" ]] || [[ "$input_remote" == "Y" ]]; then if [ "$input_remote" = "y" ] || [ "$input_remote" = "Y" ]; then
export TRANSMISSION_REMOTE=true export TRANSMISSION_REMOTE=true
echo -e "${GREEN}Remote Transmission selected.${NC}" echo -e "${GREEN}Remote Transmission selected.${NC}"
else else

View File

@ -121,7 +121,9 @@ if [ "$IS_UPDATE" = true ]; then
echo echo
read -p "Is Transmission running on a remote server? (y/n) [n]: " input_remote read -p "Is Transmission running on a remote server? (y/n) [n]: " input_remote
if [[ $input_remote =~ ^[Yy]$ ]]; then log "INFO" "DEBUG: Input received for remote: '$input_remote'"
# More explicit check for "y" or "Y" input
if [ "$input_remote" = "y" ] || [ "$input_remote" = "Y" ]; then
export TRANSMISSION_REMOTE=true export TRANSMISSION_REMOTE=true
log "INFO" "Remote Transmission selected." log "INFO" "Remote Transmission selected."
@ -259,7 +261,9 @@ else
echo echo
read -p "Is Transmission running on a remote server? (y/n) [n]: " input_remote read -p "Is Transmission running on a remote server? (y/n) [n]: " input_remote
if [[ $input_remote =~ ^[Yy]$ ]]; then log "INFO" "DEBUG: Input received for remote: '$input_remote'"
# More explicit check for "y" or "Y" input
if [ "$input_remote" = "y" ] || [ "$input_remote" = "Y" ]; then
export TRANSMISSION_REMOTE=true export TRANSMISSION_REMOTE=true
log "INFO" "Remote Transmission selected." log "INFO" "Remote Transmission selected."
else else