influxdb.sh 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #!/usr/bin/env bash
  2. source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func)
  3. # Copyright (c) 2021-2023 tteck
  4. # Author: tteck (tteckster)
  5. # License: MIT
  6. # https://github.com/tteck/Proxmox/raw/main/LICENSE
  7. function header_info {
  8. clear
  9. cat <<"EOF"
  10. ____ ______ ____ ____
  11. / _/___ / __/ /_ ___ __/ __ \/ __ )
  12. / // __ \/ /_/ / / / / |/_/ / / / __ |
  13. _/ // / / / __/ / /_/ /> </ /_/ / /_/ /
  14. /___/_/ /_/_/ /_/\__,_/_/|_/_____/_____/
  15. EOF
  16. }
  17. header_info
  18. echo -e "Loading..."
  19. APP="InfluxDB"
  20. var_disk="8"
  21. var_cpu="2"
  22. var_ram="2048"
  23. var_os="debian"
  24. var_version="11"
  25. variables
  26. color
  27. catch_errors
  28. function default_settings() {
  29. CT_TYPE="1"
  30. PW=""
  31. CT_ID=$NEXTID
  32. HN=$NSAPP
  33. DISK_SIZE="$var_disk"
  34. CORE_COUNT="$var_cpu"
  35. RAM_SIZE="$var_ram"
  36. BRG="vmbr0"
  37. NET="dhcp"
  38. GATE=""
  39. DISABLEIP6="no"
  40. MTU=""
  41. SD=""
  42. NS=""
  43. MAC=""
  44. VLAN=""
  45. SSH="no"
  46. VERB="no"
  47. echo_default
  48. }
  49. function update_script() {
  50. header_info
  51. if [[ ! -f /etc/apt/sources.list.d/influxdb.list || ! -f /etc/apt/sources.list.d/influxdata.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
  52. msg_info "Updating ${APP}"
  53. wget -q https://repos.influxdata.com/influxdata-archive_compat.key
  54. cat influxdata-archive_compat.key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null
  55. echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main' | tee /etc/apt/sources.list.d/influxdata.list
  56. rm -f /etc/apt/trusted.gpg.d/influxdb.gpg
  57. apt-get update &>/dev/null
  58. apt-get -y upgrade &>/dev/null
  59. msg_ok "Updated Successfully"
  60. exit
  61. }
  62. start
  63. build_container
  64. description
  65. msg_ok "Completed Successfully!\n"