-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
28 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; } |