apt-get
This commit is contained in:
Esteban Mackay Q. 2025-01-09 23:02:16 -05:00
parent cf8c6e3d27
commit b11d7c94af
6 changed files with 16 additions and 16 deletions

View File

@ -5,15 +5,15 @@ if [[ $EUID -ne 0 ]]; then
exit 1
fi
# Actualizar la lista de paquetes una vez al principio
apt update
apt-get update
# Ejecutar actualización completa
DEBIAN_FRONTEND=noninteractive apt full-upgrade -y
DEBIAN_FRONTEND=noninteractive apt-get full-upgrade -y
# Verificar si es necesario ejecutar autoremove
if sudo apt-get --dry-run autoremove | grep -q "The following packages will be REMOVED:"; then
if apt-get --dry-run autoremove | grep -q "The following packages will be REMOVED:"; then
echo "Ejecutando autoremove..."
sudo apt-get autoremove -y
apt-get autoremove -y
else
echo "No es necesario ejecutar autoremove."
fi

View File

@ -17,7 +17,7 @@ gpg --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138
gpg --export 04EE7237B7D453EC | sudo apt-key add -
gpg --export 648ACFD622F3D138 | sudo apt-key add -
echo "deb https://deb.debian.org/debian buster-backports main" > /etc/apt/sources.list.d/buster-backports.list
apt update -y
apt-get update -y
else
samllm3=0
fi
@ -41,7 +41,7 @@ if [ $VERSION = 12 ]; then
cd /tmp
wget https://repo.allstarlink.org/public/asl-apt-repos.deb12_all.deb
sudo dpkg -i asl-apt-repos.deb12_all.deb
sudo apt update
sudo apt-get update
else
samllm3=0
fi
@ -49,8 +49,8 @@ fi
# Install the dependencies
if [ $VERSION = 10 ]; then
apt-get remove python3-aiohttp python3-websockets -y
apt install -y python3-argon2
apt install -y -t buster-backports python3-async-timeout python3-attr python3-multidict python3-yarl
apt-get install -y python3-argon2
apt-get install -y -t buster-backports python3-async-timeout python3-attr python3-multidict python3-yarl
apt-get --fix-broken install -y
pip3 install aiohttp
pip3 install aiohttp_session
@ -76,7 +76,7 @@ if [ $VERSION = 11 ]; then
dpkg -i allmon3_1.2.0-1.bullseye_all.deb
fi
if [ $VERSION = 12 ]; then
apt install -y allmon3
apt-get install -y allmon3
fi
if [ -f "/usr/share/allmon3/index.html" ]; then
variable2=$(date +'%Y' | tail -c 5)

View File

@ -42,11 +42,11 @@ if [ -f "/etc/os-release" ]; then
if [ "$VERSION_ID" == "10" ]; then
apt update -y
apt upgrade -y
DEBIAN_FRONTEND=noninteractive apt upgrade -y
apt --fix-broken install -y
else
apt-get update
apt-get upgrade -y
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y
fi
fi
# ASTERISK install
@ -59,8 +59,8 @@ if [ ! -d "/etc/asterisk" ]; then
cd /tmp
wget https://repo.allstarlink.org/public/asl-apt-repos.deb12_all.deb
sudo dpkg -i asl-apt-repos.deb12_all.deb
sudo apt update
apt install asl3 -y
sudo apt-get update
apt-get install asl3 -y
aslr=1
elif [[ "$VERSION_ID" == "10" ]]; then
# Si es Debian 10, instalar AllStar

View File

@ -10,7 +10,7 @@ echo "Installing required packages..."
echo "Install Docker Community Edition..."
# Eliminar versiones antiguas de Docker si las hay, ignorando errores si no existen
apt -y remove docker docker-engine docker.io containerd runc --ignore-missing
apt-get -y remove docker docker-engine docker.io containerd runc --ignore-missing
# Actualizar el índice de paquetes
#apt update

View File

@ -10,7 +10,7 @@ if systemd-detect-virt --quiet; then
else
# Instalar NetworkManager si no está instalado
if ! dpkg -l | grep -q "network-manager"; then
sudo apt update -y && sudo apt install -y network-manager
sudo apt-get update -y && sudo apt-get install -y network-manager
fi
# Configurar NetworkManager para manejar las interfaces

View File

@ -38,7 +38,7 @@ XLX-CALLSIGN:
EOFX
fi
apt update
apt-get update
#
WHO=$(whoami)
if [ "$WHO" != "root" ]