plex-install.sh 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. msg_info "Setting Up Plex Media Server Repository"
  34. wget -qO- https://downloads.plex.tv/plex-keys/PlexSign.key >/etc/apt/trusted.gpg.d/PlexSign.asc
  35. echo "deb [arch=$(dpkg --print-architecture)] https://downloads.plex.tv/repo/deb/ public main" >/etc/apt/sources.list.d/plexmediaserver.list
  36. msg_ok "Set Up Plex Media Server Repository"
  37. msg_info "Installing Plex Media Server"
  38. $STD apt-get update
  39. $STD apt-get -o Dpkg::Options::="--force-confold" install -y plexmediaserver
  40. msg_ok "Installed Plex Media Server"
  41. motd_ssh
  42. customize
  43. msg_info "Cleaning up"
  44. $STD apt-get autoremove
  45. $STD apt-get autoclean
  46. msg_ok "Cleaned"