emby-install.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. msg_ok "Installed Dependencies"
  18. if [[ "$CTTYPE" == "0" ]]; then
  19. msg_info "Setting Up Hardware Acceleration"
  20. $STD apt-get -y install \
  21. va-driver-all \
  22. ocl-icd-libopencl1
  23. if [[ ${PCT_OSVERSION} == "20.04" ]]; then
  24. $STD apt-get install -y beignet-opencl-icd
  25. else
  26. $STD apt-get install -y intel-opencl-icd
  27. fi
  28. /bin/chgrp video /dev/dri
  29. /bin/chmod 755 /dev/dri
  30. /bin/chmod 660 /dev/dri/*
  31. msg_ok "Set Up Hardware Acceleration"
  32. fi
  33. LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4)
  34. msg_info "Installing Emby"
  35. wget -q https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_amd64.deb
  36. $STD dpkg -i emby-server-deb_${LATEST}_amd64.deb
  37. msg_ok "Installed Emby"
  38. motd_ssh
  39. customize
  40. msg_info "Cleaning up"
  41. $STD apt-get autoremove
  42. $STD apt-get autoclean
  43. rm emby-server-deb_${LATEST}_amd64.deb
  44. msg_ok "Cleaned"