Skip to content

Commit

Permalink
Update update.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
weskerty authored Oct 3, 2024
1 parent bd4dc55 commit 4425356
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions web/Guias/Utilidades/update.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
#!/bin/bash
apt update -y && apt upgrade -y
cd $HOME/mystic/ || echo Falla. Mystic no Existe.
npm install @whiskeysockets/baileys@latest --force || echo "#########Error al Actualizar Baileys. Continuando Igualmente"
npm start .

RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'

echo -e "${YELLOW}######### Actualizando Sistema...${NC}"
apt-get update -y && apt-get upgrade -y

cd "$HOME/mystic/" || { echo -e "${RED}######### Error. No existe Mystic.${NC}"; exit 1; }

echo -e "${YELLOW}######### Comprobando Actualizacion...${NC}"
git_output=$(git pull https://github.com/BrunoSobrino/TheMystic-Bot-MD.git)

if [[ "$git_output" == *"Already up to date."* ]]; then
echo -e "${GREEN}######### Ya Actualizado.${NC}"
else
echo -e "${YELLOW}######### Actualizando${NC}"

npm install || { echo -e "${RED}######### Error en NPM INSTALL.${NC}"; }

echo -e "${GREEN}######### Actualizacion Completa.${NC}"
fi

cd "$HOME" || { echo -e "${RED}######### Error en cd Home.${NC}"; exit 1; }

echo -e "${YELLOW}######### Ejecutando Mystic...${NC}"
nice -n -10 ./mystic.sh || { echo -e "${RED}######### Error al ejecutar mystic.sh.${NC}"; exit 1; }

0 comments on commit 4425356

Please sign in to comment.