Fix Transmission remote configuration handling

This commit addresses an issue where the Transmission remote setting wasn't properly preserved between install scripts.
Major changes:

- Fixed environment variable sharing between install-script.sh and main-installer.sh
- Added multiple methods to locate and load the .env.install file
- Removed duplicate log message in dependencies-module.sh
- Improved permission handling for the environment file
- Directly export TRANSMISSION_REMOTE variable before launching main-installer.sh

This ensures the user's choice of remote or local Transmission is correctly honored throughout the installation process.

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-03-05 09:35:10 +00:00
parent b54086cfd0
commit 455006992d
3 changed files with 26 additions and 5 deletions
+5 -1
View File
@@ -1186,6 +1186,9 @@ fi
echo "export TRANSMISSION_REMOTE=$TRANSMISSION_REMOTE" > "${SCRIPT_DIR}/.env.install"
chmod +x "${SCRIPT_DIR}/.env.install"
# Ensure the environment file is world-readable to avoid permission issues
chmod 644 "${SCRIPT_DIR}/.env.install"
# Force inclusion in the main installer - modify the main installer temporarily if needed
if ! grep -q "source.*\.env\.install" "${SCRIPT_DIR}/main-installer.sh"; then
# Backup the main installer
@@ -1198,4 +1201,5 @@ fi
# Now execute the main installer with the environment variables set
echo "Running main installer with TRANSMISSION_REMOTE=$TRANSMISSION_REMOTE"
bash -c "source ${SCRIPT_DIR}/.env.install && ${SCRIPT_DIR}/main-installer.sh"
export TRANSMISSION_REMOTE
"${SCRIPT_DIR}/main-installer.sh"