unifi-install.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #!/usr/bin/env bash
  2. # Copyright (c) 2021-2023 tteck
  3. # Author: tteck (tteckster)
  4. # License: MIT
  5. # https://github.com/tteck/Proxmox/raw/main/LICENSE
  6. source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
  7. color
  8. verb_ip6
  9. catch_errors
  10. setting_up_container
  11. network_check
  12. update_os
  13. msg_info "Installing Dependencies"
  14. $STD apt-get install -y curl
  15. $STD apt-get install -y sudo
  16. $STD apt-get install -y mc
  17. $STD apt-get install -y apt-transport-https
  18. msg_ok "Installed Dependencies"
  19. msg_info "Installing OpenJDK"
  20. $STD apt-get install -y openjdk-11-jre-headless
  21. $STD apt-mark hold openjdk-11-*
  22. msg_ok "Installed OpenJDK"
  23. msg_info "Installing MongoDB"
  24. wget -qL https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/multiverse/binary-amd64/mongodb-org-server_3.6.23_amd64.deb
  25. $STD dpkg -i mongodb-org-server_3.6.23_amd64.deb
  26. msg_ok "Installed MongoDB"
  27. msg_info "Installing UniFi Network Application"
  28. wget -qO /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg
  29. echo 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' >/etc/apt/sources.list.d/100-ubnt-unifi.list
  30. $STD apt-get update
  31. $STD apt-get install -y unifi
  32. msg_ok "Installed UniFi Network Application"
  33. motd_ssh
  34. root
  35. msg_info "Cleaning up"
  36. rm -rf mongodb-org-server_3.6.23_amd64.deb
  37. $STD apt-get autoremove
  38. $STD apt-get autoclean
  39. msg_ok "Cleaned"