Update install.sh

merge-requests/1/head
Esteban Mackay Q. 12 months ago
parent 45896a7314
commit e6ebbd8d80

@ -4,6 +4,25 @@ if [[ $EUID -ne 0 ]]; then
echo "Este script debe ejecutarse como usuario ROOT"
exit 1
fi
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
#######
cd /
######################################################################################################################
@ -32,22 +51,6 @@ cronjob_editor "$1" "$2" "$3"
EOF
sudo chmod +x /usr/local/bin/cronedit.sh
if [ -f "/var/www/html/tgcount.php" ];
then
sudo systemctl stop apache2
#echo "found file"
else
echo "file not found"
fi
if [ -f "/var/www/html/tgcount.php" ];
then
sudo systemctl disable apache2
#echo "found file"
else
echo "file not found"
fi
if [ -f "/var/www/html/tgcount.php" ];
then
sudo rm /var/www/html/* -r
@ -216,7 +219,8 @@ fi
sudo chmod +x /opt/extra-*
#########################
#lamp
apps=("mariadb-server" "php" "libapache2-mod-php" "php-zip" "php-mbstring" "php-cli" "php-common" "php-curl" "php-xml" "php-mysql")
#"libapache2-mod-php"
apps=("mariadb-server" "php" "php-zip" "php-mbstring" "php-cli" "php-common" "php-curl" "php-xml" "php-mysql")
# Función para verificar e instalar una aplicación
check_and_install() {

Loading…
Cancel
Save

Powered by TurnKey Linux.