From 9f1c4519e66742c16216509059cd5c866b1638ce Mon Sep 17 00:00:00 2001 From: hp3icc Date: Thu, 9 Oct 2025 21:04:11 -0500 Subject: [PATCH] Update update.sh --- update.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/update.sh b/update.sh index b3fb8dc..37edde3 100644 --- a/update.sh +++ b/update.sh @@ -7,6 +7,19 @@ fi (crontab -l | grep -v "sync ; echo 3 > /proc/sys/vm/drop_caches >/dev/null 2>&1") | crontab - ############## cd / +# Actualizar la lista de paquetes una vez al principio +apt-get update + +# Ejecutar actualización completa +#DEBIAN_FRONTEND=noninteractive apt-get full-upgrade -y + +# Verificar si es necesario ejecutar autoremove +if apt-get --dry-run autoremove | grep -q "The following packages will be REMOVED:"; then + echo "Ejecutando autoremove..." + apt-get autoremove -y +else + echo "No es necesario ejecutar autoremove." +fi ################## #!/bin/bash if ! grep -q "Web-Dashboar-name" "/opt/wdp" > /dev/null 2>&1; then @@ -1206,7 +1219,7 @@ sudo systemctl stop fdmr_mon3.service 2>/dev/null || true ############################################################## # monitor3 update -############################################################ +############################################################## apps="php-sqlite3" # Función para verificar e instalar una aplicación