mirror of https://gitlab.com/hp3icc/emq-TE1.git
parent
04380031ed
commit
ac67d97771
|
|
@ -4,6 +4,25 @@ SCRIPT_NAME="nginx.sh"
|
|||
|
||||
# Registra el inicio en /opt/curl.txt
|
||||
echo "Inicio: $SCRIPT_NAME" >> /opt/curl.txt
|
||||
if command -v apache2 >/dev/null 2>&1; then
|
||||
echo "Apache está instalado."
|
||||
|
||||
# Verifica si Apache está activo (running)
|
||||
if systemctl is-active --quiet apache2; then
|
||||
echo "Apache está en ejecución. Deteniéndolo..."
|
||||
sudo systemctl stop apache2
|
||||
fi
|
||||
|
||||
# Verifica si Apache está habilitado
|
||||
if systemctl is-enabled --quiet apache2; then
|
||||
echo "Apache está habilitado. Deshabilitándolo..."
|
||||
sudo systemctl disable apache2
|
||||
fi
|
||||
|
||||
echo "Apache ha sido detenido y deshabilitado de forma permanente."
|
||||
else
|
||||
echo "Apache no está instalado en el sistema."
|
||||
fi
|
||||
if [ ! -f "/etc/nginx/sites-available/000" ]; then
|
||||
sudo apt-get install nginx php-fpm -y
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in New Issue