From 5c1e48356a1018148670f2121299bdfa5d66d392 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Thu, 9 Apr 2026 11:40:07 +0200 Subject: [PATCH] refactor: replace remaining raw os-release checks with get_os_info helpers - inventree: use get_os_info id for ubuntu check - jellyfin: use get_os_info id for intel dependency path - nginxproxymanager: use get_os_version_major for pcre package switch - frigate: use get_os_version_major while keeping Debian 12 requirement --- ct/inventree.sh | 2 +- ct/jellyfin.sh | 2 +- ct/nginxproxymanager.sh | 2 +- install/frigate-install.sh | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ct/inventree.sh b/ct/inventree.sh index 4029fed20..7015dd6ed 100644 --- a/ct/inventree.sh +++ b/ct/inventree.sh @@ -29,7 +29,7 @@ function update_script() { exit fi - if ! grep -qE "^ID=(ubuntu)$" /etc/os-release; then + if [[ "$(get_os_info id)" != "ubuntu" ]]; then msg_error "Unsupported OS. InvenTree requires Ubuntu (20.04/22.04/24.04)." exit fi diff --git a/ct/jellyfin.sh b/ct/jellyfin.sh index 31e19896b..6eff7d833 100644 --- a/ct/jellyfin.sh +++ b/ct/jellyfin.sh @@ -29,7 +29,7 @@ function update_script() { exit fi - if ! grep -qEi 'ubuntu' /etc/os-release; then + if [[ "$(get_os_info id)" != "ubuntu" ]]; then msg_info "Updating Intel Dependencies" rm -f ~/.intel-* || true fetch_and_deploy_gh_release "intel-igc-core-2" "intel/intel-graphics-compiler" "binary" "latest" "" "intel-igc-core-2_*_amd64.deb" diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index 940666606..ae7775d7f 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -55,7 +55,7 @@ function update_script() { fi local pcre_pkg="libpcre3-dev" - if grep -qE 'VERSION_ID="1[3-9]"' /etc/os-release 2>/dev/null; then + if [[ "$(get_os_version_major)" -ge 13 ]]; then pcre_pkg="libpcre2-dev" fi $STD apt install -y build-essential "$pcre_pkg" libssl-dev zlib1g-dev diff --git a/install/frigate-install.sh b/install/frigate-install.sh index 777ea893c..30bb2e9d4 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -13,8 +13,7 @@ setting_up_container network_check update_os -source /etc/os-release -if [[ "$VERSION_ID" != "12" ]]; then +if [[ "$(get_os_version_major)" != "12" ]]; then msg_error "Frigate requires Debian 12 (Bookworm) due to Python 3.11 dependencies" exit 238 fi