Update emby-install.sh

Add Unprivileged Hardware Acceleration
This commit is contained in:
tteckster 2024-04-28 09:06:03 -04:00 committed by GitHub
parent 90f696461e
commit 6c3c39b79c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,23 +19,27 @@ $STD apt-get install -y sudo
$STD apt-get install -y mc $STD apt-get install -y mc
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
msg_info "Setting Up Hardware Acceleration"
$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools}
if [[ "$CTTYPE" == "0" ]]; then if [[ "$CTTYPE" == "0" ]]; then
msg_info "Setting Up Hardware Acceleration"
$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools}
chgrp video /dev/dri chgrp video /dev/dri
chmod 755 /dev/dri chmod 755 /dev/dri
chmod 660 /dev/dri/* chmod 660 /dev/dri/*
$STD adduser $(id -u -n) video $STD adduser $(id -u -n) video
$STD adduser $(id -u -n) render $STD adduser $(id -u -n) render
msg_ok "Set Up Hardware Acceleration"
fi fi
msg_ok "Set Up Hardware Acceleration"
LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4) LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4)
msg_info "Installing Emby" msg_info "Installing Emby"
wget -q https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_amd64.deb wget -q https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_amd64.deb
$STD dpkg -i emby-server-deb_${LATEST}_amd64.deb $STD dpkg -i emby-server-deb_${LATEST}_amd64.deb
sed -i -e 's/^ssl-cert:x:104:$/render:x:104:root,emby/' -e 's/^render:x:108:root,emby$/ssl-cert:x:108:/' /etc/group if [[ "$CTTYPE" == "0" ]]; then
sed -i -e 's/^ssl-cert:x:104:$/render:x:104:root,emby/' -e 's/^render:x:108:root,emby$/ssl-cert:x:108:/' /etc/group
else
sed -i -e 's/^ssl-cert:x:104:$/render:x:104:emby/' -e 's/^render:x:108:emby$/ssl-cert:x:108:/' /etc/group
fi
msg_ok "Installed Emby" msg_ok "Installed Emby"
motd_ssh motd_ssh