3
0

vps_postinstall 838 B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/bash
  2. ADD_PKG="htop tree jq curl"
  3. DEL_PKG=""
  4. BESZEL_INSTALL_SCRIPT_URL_ORIG="https://raw.githubusercontent.com/henrygd/beszel/main/supplemental/scripts/install-agent.sh"
  5. BESZEL_INSTALL_SCRIPT_URL="https://git.linuxforward.com/byom/ovhcli/raw/main/bin/beszel-install-agent.sh"
  6. BESZEL_SSH_PORT="${BESZEL_SSH_PORT:-45876}"
  7. BESZEL_SSH_PUBKEY="${BESZEL_SSH_PUBKEY:-"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIChREmc/b6/MeHSbFRdpiUoHStQDGgUKEkyobrWL9nBB"}"
  8. install_packages(){
  9. sudo apt -qq update
  10. sudo apt -y install ${ADD_PKG}
  11. }
  12. remove_packages(){
  13. sudo apt -y purge ${DEL_PKG}
  14. }
  15. install_beszel(){
  16. curl -sL "${BESZEL_INSTALL_SCRIPT_URL}" -o install-agent.sh \
  17. && chmod +x install-agent.sh \
  18. && ./install-agent.sh -p "${BESZEL_SSH_PORT}" -k "${BESZEL_SSH_PUBKEY}" -a
  19. }
  20. install_packages
  21. #remove_packages
  22. install_beszel