Registro y elevación de componentes base (ADN, Scripts, Servicios)

This commit is contained in:
Ricardo Monla
2026-02-15 20:37:53 -03:00
parent 9e9bf62c68
commit c865a7772b
25279 changed files with 3354766 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
#!/bin/bash
# scripts/instalar_nginx_simple.sh
# Script para instalar Nginx y aplicar configuraciones (Sin manipulación de IP).
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
if [ "$EUID" -ne 0 ]; then
echo -e "${RED}Ejecutar con sudo.${NC}"
exit 1
fi
echo -e "${YELLOW}[1/3] Instalando Nginx...${NC}"
apt-get update && apt-get install -y nginx
echo -e "${YELLOW}[2/3] Aplicando configuraciones de servicios...${NC}"
# Remover default si molesta
# rm /etc/nginx/sites-enabled/default 2>/dev/null
# Enlazar configs
CONFIG_DIR="/home/rmonla/Documentos/GitHub/dtic-srv-NS8/servicios/nginx/conf.d"
ln -sf $CONFIG_DIR/*.conf /etc/nginx/conf.d/
echo -e "${YELLOW}[3/3] Iniciando servicio...${NC}"
systemctl enable nginx
systemctl restart nginx
echo -e "${GREEN}Instalación completada.${NC}"
echo "Nginx está corriendo en el Host."