Bash


SUBMITTED BY: DuiBR

DATE: Oct. 14, 2023, 2:41 a.m.

FORMAT: Text only

SIZE: 1.7 kB

HITS: 335

  1. #!/bin/bash
  2. [[ "$(whoami)" != "root" ]] && {
  3. echo
  4. echo "Instale com usuario root!"
  5. echo
  6. exit 0
  7. }
  8. [[ -e /etc/megahbot/index.js ]] && {
  9. echo
  10. echo "Atualizando bot, aguarde..."
  11. echo
  12. wget https://github.com/endblack/WaBot-VendasSSH/raw/main/mult/index.js > /dev/null 2>&1
  13. wget https://github.com/endblack/WaBot-VendasSSH/raw/main/mult/veri.js > /dev/null 2>&1
  14. wget https://github.com/endblack/WaBot-VendasSSH/raw/main/mult/gerar.js > /dev/null 2>&1
  15. wget https://github.com/endblack/WaBot-VendasSSH/raw/main/mult/qrcode > /dev/null 2>&1
  16. chmod +x qrcode
  17. mv qrcode /bin
  18. mv index.js /etc/megahbot
  19. mv veri.js gerar.js /etc/megahbot/src
  20. echo
  21. echo "Atualização terminada! digite onbot para rodar o novo programa"
  22. echo
  23. exit 0
  24. }
  25. apt update -y
  26. echo
  27. echo "Instalando bot, aguarde..."
  28. echo
  29. apt install nodejs -y > /dev/null 2>&1
  30. apt install unzip -y > /dev/null 2>&1
  31. apt install screen -y > /dev/null 2>&1
  32. apt install wget -y > /dev/null 2>&1
  33. wget https://raw.githubusercontent.com/endblack/WaBot-VendasSSH/main/mult/onbot > /dev/null 2>&1
  34. wget https://github.com/endblack/WaBot-VendasSSH/raw/main/mult/offbot > /dev/null 2>&1
  35. wget https://github.com/endblack/WaBot-VendasSSH/raw/main/mult/qrcode > /dev/null 2>&1
  36. wget https://github.com/endblack/WaBot-VendasSSH/raw/main/mult/config.js > /dev/null 2>&1
  37. chmod +x onbot offbot qrcode
  38. mv onbot offbot qrcode /bin
  39. wget https://www.dropbox.com/scl/fi/aizy6u5xpkb5f9r0hmr3l/megahbot.zip?rlkey=5r10fwbv3e9sxoj7s7q22hby7&dl=1 -O /etc/megahbot.zip > /dev/null 2>&1
  40. unzip /etc/megahbot.zip
  41. mv megahbot /etc
  42. echo
  43. echo "Instalação terminada! Não esqueça de editar seus dados no arquivo config.js"
  44. echo

comments powered by Disqus