Update tdarr-install.sh

Add Unprivileged Hardware Acceleration
This commit is contained in:
tteckster 2024-04-30 05:48:46 -04:00 committed by GitHub
parent cae357cc26
commit 90003e72f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 7 deletions

View File

@ -20,19 +20,16 @@ $STD apt-get install -y mc
$STD apt-get install -y handbrake-cli $STD apt-get install -y handbrake-cli
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
if [[ "$CTTYPE" == "0" ]]; then
msg_info "Setting Up Hardware Acceleration" msg_info "Setting Up Hardware Acceleration"
$STD apt-get -y install \ $STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools}
va-driver-all \ if [[ "$CTTYPE" == "0" ]]; then
ocl-icd-libopencl1 \
intel-opencl-icd
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"
msg_info "Installing Tdarr" msg_info "Installing Tdarr"
mkdir -p /opt/tdarr mkdir -p /opt/tdarr
@ -43,7 +40,12 @@ $STD unzip Tdarr_Updater.zip
rm -rf Tdarr_Updater.zip rm -rf Tdarr_Updater.zip
chmod +x Tdarr_Updater chmod +x Tdarr_Updater
./Tdarr_Updater &>/dev/null ./Tdarr_Updater &>/dev/null
if [[ "$CTTYPE" == "0" ]]; then
sed -i -e 's/^sgx:x:104:$/render:x:104:root/' -e 's/^render:x:106:root$/sgx:x:106:/' /etc/group sed -i -e 's/^sgx:x:104:$/render:x:104:root/' -e 's/^render:x:106:root$/sgx:x:106:/' /etc/group
else
sed -i -e 's/^sgx:x:104:$/render:x:104:/' -e 's/^render:x:106:$/sgx:x:106:/' /etc/group
fi
msg_ok "Installed Tdarr" msg_ok "Installed Tdarr"
msg_info "Creating Service" msg_info "Creating Service"