transmission-rss-manager/temp_work/bootstrap-installer.sh
MasterDraco f5404c241d Fix remote transmission detection in installer
- Fix bug in dependencies-module.sh that would prompt to install transmission-daemon for remote installations
- Add checks for TRANSMISSION_REMOTE flag to correctly handle remote vs local installations
- Update version to 2.0.2

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-05 00:35:42 +00:00

72 lines
2.1 KiB
Bash

#!/bin/bash
# Transmission RSS Manager - Bootstrap Installer
# This script downloads the latest version from git and runs the setup
# Color and formatting
GREEN='\033[0;32m'
RED='\033[0;31m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
BOLD='\033[1m'
# Installation directory
INSTALL_DIR="/opt/trans-install"
REPO_URL="https://git.powerdata.dk/masterdraco/transmission-rss-manager.git"
# Check if running as root
if [ "$EUID" -ne 0 ]; then
echo -e "${RED}This script must be run as root or with sudo privileges.${NC}"
exit 1
fi
# Display welcome message
echo -e "${GREEN}${BOLD}Transmission RSS Manager - Bootstrap Installer${NC}"
echo -e "This script will install the latest version from the git repository."
echo
# Check for git installation
echo -e "${YELLOW}Checking dependencies...${NC}"
if ! command -v git &> /dev/null; then
echo -e "Git not found. Installing git..."
apt-get update
apt-get install -y git
fi
# Check if installation directory exists
if [ -d "$INSTALL_DIR" ]; then
echo -e "${YELLOW}Installation directory already exists.${NC}"
read -p "Do you want to remove it and perform a fresh install? (y/n): " choice
if [[ "$choice" =~ ^[Yy]$ ]]; then
echo "Removing existing installation..."
rm -rf "$INSTALL_DIR"
else
echo -e "${RED}Installation aborted.${NC}"
exit 1
fi
fi
# Create installation directory
echo -e "${YELLOW}Creating installation directory...${NC}"
mkdir -p "$INSTALL_DIR"
# Clone the repository
echo -e "${YELLOW}Cloning the latest version from git...${NC}"
git clone "$REPO_URL" "$INSTALL_DIR"
if [ $? -ne 0 ]; then
echo -e "${RED}Failed to clone the repository.${NC}"
exit 1
fi
# Run the main installer
echo -e "${YELLOW}Running the main installer...${NC}"
cd "$INSTALL_DIR"
chmod +x main-installer.sh
./main-installer.sh
# Installation complete
echo -e "${GREEN}${BOLD}Bootstrap installation complete!${NC}"
echo -e "Transmission RSS Manager has been installed in $INSTALL_DIR"
echo -e "You can access the web interface at http://localhost:3000"
echo
echo -e "To update in the future, use the update button in the System Status section of the web interface."