Files
proxmox/scripts/archive/consolidated/deploy/install-npmplus-fixed.sh

57 lines
2.1 KiB
Bash
Raw Normal View History

#!/bin/bash
set -euo pipefail
# Load IP configuration
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
source "${PROJECT_ROOT}/config/ip-addresses.conf" 2>/dev/null || true
# Fixed NPMplus installation that handles the compose.yaml issue
# This script ensures compose.yaml is in place before running docker compose
set -e
PROXMOX_HOST="${1:-192.168.11.11}"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "🚀 NPMplus Installation (Fixed)"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "This script will install NPMplus using the Proxmox helper script"
echo "but with fixes for the compose.yaml error."
echo ""
echo "📋 Instructions:"
echo " 1. The script will run on the Proxmox host"
echo " 2. When prompted, enter:"
echo " • Timezone: America/New_York"
echo " • ACME Email: nsatoshi2007@hotmail.com"
echo " 3. If you see 'docker compose' errors, the fix script will handle it"
echo ""
read -p "Press Enter to start installation..."
echo ""
# Run the installation on Proxmox host
ssh root@"$PROXMOX_HOST" "bash -c \"
cd /tmp
wget -q https://github.com/community-scripts/ProxmoxVE/raw/main/ct/npmplus.sh -O npmplus-install.sh
chmod +x npmplus-install.sh
# Patch the script to ensure compose.yaml exists before docker compose commands
sed -i 's/docker compose pull/cd /opt \&\& [ -f compose.yaml ] \&\& docker compose pull || echo \\\"compose.yaml not ready yet\\\"/' npmplus-install.sh
sed -i 's/docker compose up -d/cd /opt \&\& docker compose up -d/' npmplus-install.sh
# Run the patched script
bash npmplus-install.sh
\""
echo ""
echo "✅ Installation complete!"
echo ""
echo "📋 Next steps:"
echo " 1. Note the container ID and IP from the output above"
echo " 2. Run: bash scripts/nginx-proxy-manager/post-install-migration.sh $PROXMOX_HOST <CTID> <IP>"
echo ""