openhab-install.sh 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. msg_ok "Installed Dependencies"
  20. msg_info "Installing Azul Zulu"
  21. wget -qO /etc/apt/trusted.gpg.d/zulu-repo.asc "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xB1998361219BD9C9"
  22. wget -q https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb
  23. $STD dpkg -i zulu-repo_1.0.0-3_all.deb
  24. $STD apt-get update
  25. $STD apt-get -y install zulu17-jdk
  26. msg_ok "Installed Azul Zulu"
  27. msg_info "Installing openHAB"
  28. curl -fsSL "https://openhab.jfrog.io/artifactory/api/gpg/key/public" | gpg --dearmor >openhab.gpg
  29. mv openhab.gpg /usr/share/keyrings
  30. chmod u=rw,g=r,o=r /usr/share/keyrings/openhab.gpg
  31. echo "deb [signed-by=/usr/share/keyrings/openhab.gpg] https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main" > /etc/apt/sources.list.d/openhab.list
  32. $STD apt update
  33. $STD apt-get -y install openhab
  34. systemctl daemon-reload
  35. systemctl enable -q --now openhab.service
  36. msg_ok "Installed openHAB"
  37. motd_ssh
  38. customize
  39. msg_info "Cleaning up"
  40. $STD apt-get autoremove
  41. $STD apt-get autoclean
  42. msg_ok "Cleaned"