Fix SSL setup in install script
This commit is contained in:
parent
77ef2a9ae6
commit
270e47f9a6
@ -304,12 +304,22 @@ if [ "$ENABLE_MONITORING" = true ] && [ "$USE_EXISTING_MONITORING" = false ]; th
|
|||||||
elif [ "$USE_EXISTING_MONITORING" = true ]; then
|
elif [ "$USE_EXISTING_MONITORING" = true ]; then
|
||||||
MONITORING_FLAG="--use-existing-monitoring"
|
MONITORING_FLAG="--use-existing-monitoring"
|
||||||
fi
|
fi
|
||||||
./scripts/setup_systemd.sh $MONITORING_FLAG --skip-build --domain "$DOMAIN" --email "$EMAIL" $([ "$SKIP_SSL" = true ] && echo "--skip-ssl")
|
./scripts/setup_systemd.sh $MONITORING_FLAG --skip-build
|
||||||
|
|
||||||
# Step 4: Configure cache (in-memory LRU - no Redis needed)
|
# Step 4: Configure cache (in-memory LRU - no Redis needed)
|
||||||
echo "🧠 Gateway uses in-memory LRU cache (no Redis required)"
|
echo "🧠 Gateway uses in-memory LRU cache (no Redis required)"
|
||||||
|
|
||||||
# Step 5: Setup monitoring (if requested)
|
# Step 5: Setup SSL/HTTPS (if domain and email provided)
|
||||||
|
if [ -n "$DOMAIN" ] && [ -n "$EMAIL" ] && [ "$SKIP_SSL" = false ]; then
|
||||||
|
echo "🔒 Setting up SSL certificate for $DOMAIN..."
|
||||||
|
certbot --nginx --non-interactive --agree-tos --email "$EMAIL" -d "$DOMAIN"
|
||||||
|
|
||||||
|
# Update nginx config to use the domain
|
||||||
|
sed -i "s/server_name _;/server_name $DOMAIN;/" /etc/nginx/sites-available/torrent-gateway
|
||||||
|
systemctl reload nginx
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Step 6: Setup monitoring (if requested)
|
||||||
if [ "$ENABLE_MONITORING" = true ]; then
|
if [ "$ENABLE_MONITORING" = true ]; then
|
||||||
echo "📊 Installing monitoring components..."
|
echo "📊 Installing monitoring components..."
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user