grafana-install.sh 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 gnupg
  18. $STD apt-get install -y apt-transport-https
  19. $STD apt-get install -y software-properties-common
  20. msg_ok "Installed Dependencies"
  21. msg_info "Setting up Grafana Repository"
  22. wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key
  23. sh -c 'echo "deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main" > /etc/apt/sources.list.d/grafana.list'
  24. msg_ok "Set up Grafana Repository"
  25. msg_info "Installing Grafana"
  26. $STD apt-get update
  27. $STD apt-get install -y grafana
  28. systemctl start grafana-server
  29. systemctl enable --now -q grafana-server.service
  30. msg_ok "Installed Grafana"
  31. motd_ssh
  32. customize
  33. msg_info "Cleaning up"
  34. $STD apt-get autoremove
  35. $STD apt-get autoclean
  36. msg_ok "Cleaned"