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
This commit is contained in:
CanbiZ (MickLesk)
2026-04-09 11:40:07 +02:00
parent 6c0d7d4482
commit 5c1e48356a
4 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -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
+1 -2
View File
@@ -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