diff --git a/bin/bootstrap.sh b/bin/bootstrap.sh index df2ddc2..413e394 100755 --- a/bin/bootstrap.sh +++ b/bin/bootstrap.sh @@ -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. ] @@ -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 } diff --git a/bin/update.sh b/bin/update.sh index 5e39e82..4c1d081 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -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. ] @@ -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