Fix input recognition in remote selection and add debug information
This commit is contained in:
parent
455006992d
commit
95a086dff7
@ -1174,7 +1174,8 @@ 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
|
||||
# Explicitly check for "y" or "Y" response
|
||||
if [[ "$input_remote" == "y" ]] || [[ "$input_remote" == "Y" ]]; then
|
||||
export TRANSMISSION_REMOTE=true
|
||||
echo -e "${GREEN}Remote Transmission selected.${NC}"
|
||||
else
|
||||
|
@ -10,13 +10,24 @@ function install_dependencies() {
|
||||
|
||||
# Try relative path first
|
||||
ENV_FILE="$(dirname "$(dirname "$0")")/.env.install"
|
||||
|
||||
# Debug information to help trace the issue
|
||||
log "INFO" "Debug: ENV_FILE path is: $ENV_FILE"
|
||||
if [ -f "$ENV_FILE" ]; then
|
||||
log "INFO" "Debug: Env file content before sourcing:"
|
||||
cat "$ENV_FILE" | while read line; do log "INFO" "Debug: $line"; done
|
||||
|
||||
source "$ENV_FILE"
|
||||
log "INFO" "Loaded transmission settings from environment file: TRANSMISSION_REMOTE=$TRANSMISSION_REMOTE"
|
||||
# Try absolute path as fallback
|
||||
elif [ -f "/opt/develop/transmission-rss-manager/.env.install" ]; then
|
||||
log "INFO" "Debug: Using absolute path instead. Content:"
|
||||
cat "/opt/develop/transmission-rss-manager/.env.install" | while read line; do log "INFO" "Debug: $line"; done
|
||||
|
||||
source "/opt/develop/transmission-rss-manager/.env.install"
|
||||
log "INFO" "Loaded transmission settings from absolute path: TRANSMISSION_REMOTE=$TRANSMISSION_REMOTE"
|
||||
else
|
||||
log "WARN" "Debug: No env file found at either location"
|
||||
fi
|
||||
|
||||
# Always prompt if we didn't get TRANSMISSION_REMOTE from environment or previous steps
|
||||
|
Loading…
x
Reference in New Issue
Block a user