fix(termix): download nginx.conf from upstream repo (#11228)

This commit is contained in:
CanbiZ (MickLesk)
2026-01-27 14:03:47 +01:00
committed by GitHub
parent d1419e21a4
commit 5a86b4a219
2 changed files with 20 additions and 408 deletions

View File

@@ -81,6 +81,23 @@ function update_script() {
cp -r /opt/termix/public/fonts /opt/termix/html/fonts 2>/dev/null || true
msg_ok "Updated Frontend Files"
msg_warn "The Nginx configuration may need to be updated for new features to work."
msg_custom "💾" "Your current config will be backed up to termix.conf.bak"
msg_custom "⚠️ " "Note: Custom modifications (reverse proxy, SSL) will be overwritten!"
echo ""
read -rp "${TAB3}Update Nginx configuration? [Y/n]: " REPLY
if [[ "${REPLY,,}" =~ ^(y|yes|)$ ]]; then
msg_info "Updating Nginx Configuration"
cp /etc/nginx/sites-available/termix.conf /etc/nginx/sites-available/termix.conf.bak
curl -fsSL "https://raw.githubusercontent.com/Termix-SSH/Termix/main/docker/nginx.conf" -o /etc/nginx/sites-available/termix.conf
sed -i 's|/app/html|/opt/termix/html|g' /etc/nginx/sites-available/termix.conf
sed -i 's|/app/nginx|/opt/termix/nginx|g' /etc/nginx/sites-available/termix.conf
systemctl reload nginx
msg_ok "Updated Nginx Configuration"
else
msg_warn "Nginx configuration not updated. If Termix doesn't work, restore from backup or update manually."
fi
msg_info "Starting Service"
systemctl start termix
msg_ok "Started Service"