diff --git a/install/scrypted-install.sh b/install/scrypted-install.sh index a85c2271..6e54f790 100644 --- a/install/scrypted-install.sh +++ b/install/scrypted-install.sh @@ -35,22 +35,20 @@ $STD apt-get -y install \ sudo \ mc \ ca-certificates \ - gnupg + gpg 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 - msg_info "Setting Up Hardware Acceleration" - $STD apt-get -y install \ - va-driver-all \ - ocl-icd-libopencl1 \ - intel-opencl-icd chgrp video /dev/dri chmod 755 /dev/dri chmod 660 /dev/dri/* $STD adduser $(id -u -n) video $STD adduser $(id -u -n) render - msg_ok "Set Up Hardware Acceleration" fi +msg_ok "Set Up Hardware Acceleration" + msg_info "Installing GStreamer (Patience)" $STD apt-get -y install \ gstreamer1.0-tools \ @@ -98,24 +96,19 @@ $STD python3 -m pip install --upgrade pip $STD python3 -m pip install aiofiles debugpy typing_extensions typing msg_ok "Installed Python3 Dependencies" -read -r -p "Would you like to add Coral Edge TPU support? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then -msg_info "Adding Coral Edge TPU Support" -wget -qO /etc/apt/trusted.gpg.d/coral-repo.asc "https://packages.cloud.google.com/apt/doc/apt-key.gpg" -echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" >/etc/apt/sources.list.d/coral-edgetpu.list -$STD apt-get -y update -$STD apt-get -y install libedgetpu1-std -msg_ok "Coral Edge TPU Support Added" -fi - msg_info "Installing Scrypted" $STD npx -y scrypted@latest install-server -sed -i -e 's/^sgx:x:104:$/render:x:104:root/' -e 's/^render:x:106:root$/sgx:x:106:/' /etc/group + +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 +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 Scrypted" msg_info "Creating Service" -service_path="/etc/systemd/system/scrypted.service" -echo "[Unit] +cat </etc/systemd/system/scrypted.service +[Unit] Description=Scrypted service After=network.target @@ -128,8 +121,9 @@ Restart=on-failure RestartSec=3 [Install] -WantedBy=multi-user.target" >$service_path -$STD systemctl enable --now scrypted.service +WantedBy=multi-user.target +EOF +systemctl enable -q --now scrypted.service msg_ok "Created Service" motd_ssh