Fix remote Transmission detection and config directory creation
- Fix bug where installer doesn't ask if Transmission is remote - Fix missing configuration directory in /etc/transmission-rss-manager - Create symlink between config locations to ensure app always finds config - Ensure CONFIG_DIR is properly exported in the environment - Update version to 2.0.4 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -114,6 +114,7 @@ function gather_configuration() {
|
||||
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
|
||||
|
||||
# Get and validate hostname
|
||||
while true; do
|
||||
@@ -227,6 +228,9 @@ function gather_configuration() {
|
||||
TRANSMISSION_DOWNLOAD_DIR=$REMOTE_DOWNLOAD_DIR
|
||||
else
|
||||
# Local Transmission selected
|
||||
TRANSMISSION_REMOTE=false
|
||||
export TRANSMISSION_REMOTE=false
|
||||
|
||||
echo -e "${YELLOW}You've selected to use a local Transmission installation.${NC}"
|
||||
|
||||
# Check if Transmission is already installed
|
||||
|
||||
@@ -35,8 +35,8 @@ function install_dependencies() {
|
||||
log "INFO" "Node.js is already installed."
|
||||
fi
|
||||
|
||||
# Check if we need to install Transmission (only if local transmission was selected and not remote)
|
||||
if [ "$TRANSMISSION_REMOTE" = false ] && ([ "$TRANSMISSION_HOST" = "localhost" ] || [ "$TRANSMISSION_HOST" = "127.0.0.1" ]); then
|
||||
# Check if we need to install Transmission (only if local transmission was selected)
|
||||
if [ "$TRANSMISSION_REMOTE" = false ]; then
|
||||
if ! command_exists transmission-daemon; then
|
||||
log "INFO" "Local Transmission installation selected, but transmission-daemon is not installed."
|
||||
read -p "Would you like to install Transmission now? (y/n): " install_transmission
|
||||
@@ -109,8 +109,8 @@ function install_dependencies() {
|
||||
local dependencies=("node" "npm" "unzip" "nginx")
|
||||
local missing_deps=()
|
||||
|
||||
# Add transmission to dependencies check if local installation was selected and not remote
|
||||
if [ "$TRANSMISSION_REMOTE" = false ] && ([ "$TRANSMISSION_HOST" = "localhost" ] || [ "$TRANSMISSION_HOST" = "127.0.0.1" ]); then
|
||||
# Add transmission to dependencies check if local installation was selected
|
||||
if [ "$TRANSMISSION_REMOTE" = false ]; then
|
||||
dependencies+=("transmission-daemon")
|
||||
fi
|
||||
|
||||
@@ -191,5 +191,9 @@ function create_directories() {
|
||||
chown -R "$USER:$USER" "$CONFIG_DIR"
|
||||
chmod 755 "$CONFIG_DIR"
|
||||
|
||||
# Create a symlink from the installation directory to the config directory
|
||||
# This ensures the application can find the config regardless of where it looks
|
||||
ln -sf "$CONFIG_DIR/config.json" "$INSTALL_DIR/config.json"
|
||||
|
||||
log "INFO" "Directories created successfully."
|
||||
}
|
||||
@@ -6,6 +6,7 @@ function create_config_files() {
|
||||
|
||||
# Create initial config.json
|
||||
echo "Creating config.json..."
|
||||
mkdir -p "$CONFIG_DIR"
|
||||
cat > $CONFIG_DIR/config.json << EOF
|
||||
{
|
||||
"version": "2.0.3",
|
||||
|
||||
Reference in New Issue
Block a user