diff --git a/ct/tunarr.sh b/ct/tunarr.sh index cc8d2aed..0934e9a8 100644 --- a/ct/tunarr.sh +++ b/ct/tunarr.sh @@ -32,8 +32,12 @@ function update_script() { msg_ok "Stopped Service" msg_info "Creating Backup" - tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" /usr/.local/share/tunarr - msg_ok "Backup Created" + if [ -d "/usr/local/share/tunarr" ]; then + tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" /usr/local/share/tunarr $STD + msg_ok "Backup Created" + else + msg_error "Backup failed: /usr/local/share/tunarr does not exist" + fi CLEAN_INSTALL=1 fetch_and_deploy_gh_release "tunarr" "chrisbenincasa/tunarr" "singlefile" "latest" "/opt/tunarr" "*linux-x64" diff --git a/install/tunarr-install.sh b/install/tunarr-install.sh index 854db713..b93e569d 100644 --- a/install/tunarr-install.sh +++ b/install/tunarr-install.sh @@ -27,22 +27,27 @@ msg_ok "Set Up Hardware Acceleration" read -r -p "${TAB3}Do you need the intel-media-va-driver-non-free driver for HW encoding (Debian 12 only)? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Installing Intel Hardware Acceleration (non-free)" - cat </etc/apt/sources.list.d/non-free.list + cat <<'EOF' >/etc/apt/sources.list.d/non-free.sources +Types: deb deb-src +URIs: http://deb.debian.org/debian +Suites: trixie +Components: non-free non-free-firmware -deb http://deb.debian.org/debian bookworm non-free non-free-firmware -deb-src http://deb.debian.org/debian bookworm non-free non-free-firmware +Types: deb deb-src +URIs: http://deb.debian.org/debian-security +Suites: trixie-security +Components: non-free non-free-firmware -deb http://deb.debian.org/debian-security bookworm-security non-free non-free-firmware -deb-src http://deb.debian.org/debian-security bookworm-security non-free non-free-firmware - -deb http://deb.debian.org/debian bookworm-updates non-free non-free-firmware -deb-src http://deb.debian.org/debian bookworm-updates non-free non-free-firmware +Types: deb deb-src +URIs: http://deb.debian.org/debian +Suites: trixie-updates +Components: non-free non-free-firmware EOF - $STD apt-get update - $STD apt-get -y install {intel-media-va-driver-non-free,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} + $STD apt update + $STD apt -y install {intel-media-va-driver-non-free,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} else msg_info "Installing Intel Hardware Acceleration" - $STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} + $STD apt -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} fi msg_ok "Installed and Set Up Intel Hardware Acceleration" @@ -80,6 +85,7 @@ motd_ssh customize msg_info "Cleaning up" -$STD apt-get -y autoremove -$STD apt-get -y autoclean +$STD apt -y autoremove +$STD apt -y autoclean +$STD apt -y clean msg_ok "Cleaned"