[IMPROVED] Añadir instalación y actualización de redis-cli

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Mauro Rosero P. 2025-03-30 15:42:50 -05:00
parent 3d6c2369c2
commit b979ef59fd
Signed by: mrosero
GPG key ID: 83BD2A5F674B7E26
2 changed files with 36 additions and 4 deletions

View file

@ -6,8 +6,8 @@
#Company Email : mauro@rosero.one
#Personal Email : mauro.rosero@gmail.com
#Created : 2025/03/19 11:57:08
#Modified : 2025/03/15 16:30:00
#Version : 1.2.0
#Modified : 2025/03/30 16:30:00
#Version : 1.3.0
#Use Notes :
#==============================================================================
# Derechos de Autor [2025] [Mauro Rosero P. <mauro@rosero.one>]
@ -88,6 +88,7 @@ install() {
local ANSIBLE_PACKAGE="$ANSIBLE_COMMAND"
local OATHTOOL_PACKAGE=oathtool
local ZBAR_PACKAGE=zbar
local REDIS_CLI_PACKAGE=redis-tools
# Load base bash library
BIN_HOME=$BIN_PATH
@ -202,6 +203,14 @@ install() {
echo "Instalando zbar..."
zbar_install
fi
# Install redis-cli if not already installed
command_installed redis-cli
if [ $? -ne 0 ]
then
echo "Instalando redis-cli..."
os_pkgs_install $REDIS_CLI_PACKAGE
fi
}

View file

@ -6,8 +6,8 @@
#Company Email : mauro@rosero.one
#Personal Email : mauro.rosero@gmail.com
#Created : 2024/12/09 10:27:00
#Modified : 2025/03/19 11:57:08
#Version : 1.2.0
#Modified : 2025/03/30 16:30:00
#Version : 1.3.0
#Use Notes :
#==============================================================================
# Derechos de Autor [2025] [Mauro Rosero P. <mauro@rosero.one>]
@ -224,6 +224,29 @@ update_additional_tools() {
zbar_install
echo -e "${head_info}: zbar actualizado correctamente."
fi
# Actualizar redis-cli si está instalado
command_installed redis-cli
if [ $? -eq 0 ]; then
echo -e "\n${head_info}: Actualizando redis-cli..."
if [ -f /etc/debian_version ] || [ -f /etc/os-release ]; then
# Para sistemas basados en Debian
apt update
apt install --only-upgrade -y redis-tools
elif [ -f /etc/redhat-release ]; then
# Para sistemas basados en Red Hat
dnf upgrade -y redis
elif [ -f /etc/arch-release ]; then
# Para Arch Linux
pacman -Syu --noconfirm redis
elif [ "$(uname)" == "Darwin" ]; then
# Para macOS con Homebrew
brew upgrade redis
else
echo -e "${head_error}: Sistema operativo no soportado para actualizar redis-cli"
fi
echo -e "${head_info}: redis-cli actualizado correctamente."
fi
}
# Actualizar herramientas adicionales con sudo si están instaladas