Compare commits

...

4 Commits

Author SHA1 Message Date
CanbiZ (MickLesk)
ccefa7f1b4 Update proxmox-datacenter-manager.sh 2026-04-09 11:40:42 +02:00
CanbiZ (MickLesk)
5c1e48356a 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
2026-04-09 11:40:07 +02:00
CanbiZ (MickLesk)
6c0d7d4482 fix: replace hardcoded OS codename/version detection with get_os_info helpers
- checkmk: use github_api_call+jq for tag fetch, get_os_info codename in deb URL, strip +security suffix, bump default to Debian 13
- cockpit: remove source /etc/os-release, use get_os_info codename for backports suite/install, get_os_version_major for version check
- flaresolverr: replace raw grep on /etc/os-release with get_os_version_major
- lldap: remove source /etc/os-release, use get_os_info id+version for repo URL
- mqtt: remove unused source /etc/os-release
- pangolin: replace . /etc/os-release + VERSION_CODENAME with get_os_info codename
- paperless-ngx: replace both . /etc/os-release + VERSION_CODENAME checks with get_os_info codename
- photoprism: replace hardcoded bookworm in libheif URL with get_os_info codename
- proxmox-datacenter-manager: replace grep on os-release string with get_os_version_major
- wireguard: replace . /etc/os-release + VERSION_CODENAME with get_os_info codename
- zabbix: replace . /etc/os-release + VERSION_CODENAME with get_os_info codename
2026-04-09 11:20:40 +02:00
CanbiZ (MickLesk)
4b98345f67 checkmk: default v13 + dynamic codename
Bump default Checkmk version to 13 and make package download resilient across OS codenames and tag metadata. Trim any "+" suffix from the GitHub tag (RELEASE="${RELEASE%%+*}") and replace the hardcoded "bookworm" in the .deb filename with $(get_os_info codename). Changes applied to ct/checkmk.sh and install/checkmk-install.sh to ensure correct package selection and installation/update flow.
2026-04-09 10:09:34 +02:00
17 changed files with 39 additions and 45 deletions

View File

@@ -11,7 +11,7 @@ var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-6}"
var_os="${var_os:-debian}"
var_version="${var_version:-12}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
@@ -28,11 +28,12 @@ function update_script() {
exit
fi
RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags | grep "name" | awk '{print substr($2, 3, length($2)-4) }' | tr ' ' '\n' | grep -Ev 'rc|b' | sort -V | tail -n 1)
RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags?per_page=50 | jq -r '.[].name' | sed 's/^v//' | grep -Ev 'rc|b' | sort -V | tail -n 1)
RELEASE="${RELEASE%%+*}"
msg_info "Updating ${APP} to v${RELEASE}"
$STD omd stop monitoring
$STD omd cp monitoring monitoringbackup
curl -fsSL "https://download.checkmk.com/checkmk/${RELEASE}/check-mk-raw-${RELEASE}_0.bookworm_amd64.deb" -o "/opt/checkmk.deb"
curl -fsSL "https://download.checkmk.com/checkmk/${RELEASE}/check-mk-raw-${RELEASE}_0.$(get_os_info codename)_amd64.deb" -o "/opt/checkmk.deb"
$STD apt-get install -y /opt/checkmk.deb
$STD omd --force -V ${RELEASE}.cre update --conflict=install monitoring
$STD omd start monitoring

View File

@@ -28,7 +28,7 @@ function update_script() {
msg_error "No ${APP} Installation Found!"
exit
fi
if [[ $(grep -E '^VERSION_ID=' /etc/os-release) == *"12"* ]]; then
if [[ "$(get_os_version_major)" == "12" ]]; then
msg_error "Wrong Debian version detected!"
msg_error "You must upgrade your LXC to Debian Trixie before updating."
exit

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

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"

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

View File

@@ -65,8 +65,7 @@ function update_script() {
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "paperless" "paperless-ngx/paperless-ngx" "prebuild" "latest" "/opt/paperless" "paperless*tar.xz"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "jbig2enc" "ie13/jbig2enc" "tarball" "latest" "/opt/jbig2enc"
. /etc/os-release
if [ "$VERSION_CODENAME" = "bookworm" ]; then
if [ "$(get_os_info codename)" = "bookworm" ]; then
setup_gs
else
ensure_dependencies ghostscript
@@ -140,8 +139,7 @@ function update_script() {
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "paperless" "paperless-ngx/paperless-ngx" "prebuild" "latest" "/opt/paperless" "paperless*tar.xz"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "jbig2enc" "ie13/jbig2enc" "tarball" "latest" "/opt/jbig2enc"
. /etc/os-release
if [ "$VERSION_CODENAME" = "bookworm" ]; then
if [ "$(get_os_info codename)" = "bookworm" ]; then
setup_gs
else
msg_info "Installing Ghostscript"

View File

@@ -42,7 +42,7 @@ function update_script() {
fetch_and_deploy_gh_release "photoprism" "photoprism/photoprism" "prebuild" "latest" "/opt/photoprism" "*linux-amd64.tar.gz"
LIBHEIF_URL=$(curl -fsSL "https://dl.photoprism.app/dist/libheif/" | grep -oP "libheif-bookworm-amd64-v[0-9\.]+\.tar\.gz" | sort -V | tail -n 1)
LIBHEIF_URL=$(curl -fsSL "https://dl.photoprism.app/dist/libheif/" | grep -oP "libheif-$(get_os_info codename)-amd64-v[0-9\.]+\.tar\.gz" | sort -V | tail -n 1)
if [[ "${LIBHEIF_URL}" != "$(cat ~/.photoprism_libheif 2>/dev/null)" ]] || [[ ! -f ~/.photoprism_libheif ]]; then
msg_info "Updating PhotoPrism LibHeif"
ensure_dependencies libvips42

View File

@@ -28,7 +28,7 @@ function update_script() {
exit
fi
if grep -q 'Debian GNU/Linux 12' /etc/os-release && [ -f /etc/apt/sources.list.d/proxmox-release-bookworm.list ] && [ -f /etc/apt/sources.list.d/pdm-test.list ]; then
if [[ "$(get_os_version_major)" == "12" ]] && [ -f /etc/apt/sources.list.d/proxmox-release-bookworm.list ] && [ -f /etc/apt/sources.list.d/pdm-test.list ]; then
msg_info "Updating outdated outdated source formats"
echo "deb [signed-by=/usr/share/keyrings/proxmox-archive-keyring.gpg] http://download.proxmox.com/debian/pdm bookworm pdm-test" >/etc/apt/sources.list.d/pdm-test.list
curl -fsSL https://enterprise.proxmox.com/debian/proxmox-archive-keyring-trixie.gpg -o /usr/share/keyrings/proxmox-archive-keyring.gpg
@@ -37,16 +37,16 @@ function update_script() {
msg_ok "Updated old sources"
fi
if grep -q 'Debian GNU/Linux 13' /etc/os-release; then
if [[ "$(get_os_version_major)" == "13" ]]; then
if [ -f "/etc/apt/sources.list.d/pdm-test.sources" ]; then
if ! grep -qx "Enabled: false" "/etc/apt/sources.list.d/pdm-test.sources"; then
echo "Enabled: false" >> "/etc/apt/sources.list.d/pdm-test.sources"
setup_deb822_repo \
"pdm" \
"https://enterprise.proxmox.com/debian/proxmox-archive-keyring-trixie.gpg" \
"http://download.proxmox.com/debian/pdm" \
"trixie" \
"pdm-no-subscription"
echo "Enabled: false" >>"/etc/apt/sources.list.d/pdm-test.sources"
setup_deb822_repo \
"pdm" \
"https://enterprise.proxmox.com/debian/proxmox-archive-keyring-trixie.gpg" \
"http://download.proxmox.com/debian/pdm" \
"trixie" \
"pdm-no-subscription"
fi
fi
fi

View File

@@ -29,9 +29,8 @@ function update_script() {
exit
fi
. /etc/os-release
if [ "$VERSION_CODENAME" != "trixie" ]; then
msg_error "Unsupported Debian version: $VERSION_CODENAME please upgrade to Debian 13 (Trixie) before updating Zabbix."
if [ "$(get_os_info codename)" != "trixie" ]; then
msg_error "Unsupported Debian version: $(get_os_info codename) please upgrade to Debian 13 (Trixie) before updating Zabbix."
exit
fi

View File

@@ -14,8 +14,9 @@ network_check
update_os
msg_info "Install Checkmk"
RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags | grep "name" | awk '{print substr($2, 3, length($2)-4) }' | tr ' ' '\n' | grep -Ev 'rc|b' | sort -V | tail -n 1)
curl -fsSL "https://download.checkmk.com/checkmk/${RELEASE}/check-mk-raw-${RELEASE}_0.bookworm_amd64.deb" -o "/opt/checkmk.deb"
RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags?per_page=50 | jq -r '.[].name' | sed 's/^v//' | grep -Ev 'rc|b' | sort -V | tail -n 1)
RELEASE="${RELEASE%%+*}"
curl -fsSL "https://download.checkmk.com/checkmk/${RELEASE}/check-mk-raw-${RELEASE}_0.$(get_os_info codename)_amd64.deb" -o "/opt/checkmk.deb"
$STD apt-get install -y /opt/checkmk.deb
rm -rf /opt/checkmk.deb
echo "${RELEASE}" >"/opt/checkmk_version.txt"

View File

@@ -15,26 +15,25 @@ network_check
update_os
msg_info "Installing Cockpit"
source /etc/os-release
cat <<EOF >/etc/apt/sources.list.d/debian-backports.sources
Types: deb deb-src
URIs: http://deb.debian.org/debian
Suites: ${VERSION_CODENAME}-backports
Suites: $(get_os_info codename)-backports
Components: main
Enabled: yes
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
EOF
$STD apt update
$STD apt install -t ${VERSION_CODENAME}-backports cockpit cracklib-runtime --no-install-recommends -y
$STD apt install -t $(get_os_info codename)-backports cockpit cracklib-runtime --no-install-recommends -y
sed -i "s/root//g" /etc/cockpit/disallowed-users
msg_ok "Installed Cockpit"
read -r -p "Would you like to install 45Drives' cockpit-file-sharing, cockpit-identities, and cockpit-navigator <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
install_45drives=true
if [[ "${VERSION_ID}" -ge 13 ]]; then
read -r -p "Debian ${VERSION_ID} is not officially supported by 45Drives yet, would you like to continue anyway? <y/N> " prompt
if [[ "$(get_os_version_major)" -ge 13 ]]; then
read -r -p "Debian $(get_os_version_major) is not officially supported by 45Drives yet, would you like to continue anyway? <y/N> " prompt
if [[ ! "${prompt,,}" =~ ^(y|yes)$ ]]; then
install_45drives=false
fi

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

View File

@@ -15,17 +15,17 @@ network_check
update_os
msg_info "Installing lldap"
source /etc/os-release
os=$ID
if [ "$os" == "ubuntu" ]; then
OS_ID=$(get_os_info id)
OS_VERSION=$(get_os_info version)
if [ "$OS_ID" == "ubuntu" ]; then
DISTRO="xUbuntu"
else
DISTRO="${os^}"
DISTRO="${OS_ID^}"
fi
curl -fsSL https://download.opensuse.org/repositories/home:Masgalor:LLDAP/${DISTRO}_${VERSION_ID}/Release.key | gpg --dearmor >/usr/share/keyrings/home_Masgalor_LLDAP.gpg
curl -fsSL https://download.opensuse.org/repositories/home:Masgalor:LLDAP/${DISTRO}_${OS_VERSION}/Release.key | gpg --dearmor >/usr/share/keyrings/home_Masgalor_LLDAP.gpg
cat <<EOF >/etc/apt/sources.list.d/home:Masgalor:LLDAP.sources
Types: deb
URIs: http://download.opensuse.org/repositories/home:/Masgalor:/LLDAP/${DISTRO}_${VERSION_ID}/
URIs: http://download.opensuse.org/repositories/home:/Masgalor:/LLDAP/${DISTRO}_${OS_VERSION}/
Suites: /
Signed-By: /usr/share/keyrings/home_Masgalor_LLDAP.gpg
EOF

View File

@@ -14,7 +14,6 @@ network_check
update_os
msg_info "Installing Mosquitto MQTT Broker"
source /etc/os-release
$STD apt update
$STD apt -y install mosquitto mosquitto-clients

View File

@@ -182,8 +182,7 @@ http:
EOF
$STD npm run db:push
. /etc/os-release
if [ "$VERSION_CODENAME" = "trixie" ]; then
if [ "$(get_os_info codename)" = "trixie" ]; then
echo "net.ipv4.ip_forward=1" >>/etc/sysctl.d/sysctl.conf
$STD sysctl -p /etc/sysctl.d/sysctl.conf
else

View File

@@ -40,7 +40,7 @@ msg_info "Installing PhotoPrism (Patience)"
mkdir -p /opt/photoprism/{cache,config,photos,storage,temp}
mkdir -p /opt/photoprism/photos/{originals,import}
mkdir -p /opt/photoprism_backups
LIBHEIF_URL=$(curl -fsSL "https://dl.photoprism.app/dist/libheif/" | grep -oP "libheif-bookworm-amd64-v[0-9\.]+\.tar\.gz" | sort -V | tail -n 1)
LIBHEIF_URL=$(curl -fsSL "https://dl.photoprism.app/dist/libheif/" | grep -oP "libheif-$(get_os_info codename)-amd64-v[0-9\.]+\.tar\.gz" | sort -V | tail -n 1)
curl -fsSL "https://dl.photoprism.app/dist/libheif/$LIBHEIF_URL" -o /tmp/libheif.tar.gz
tar -xzf /tmp/libheif.tar.gz -C /usr/local
ldconfig

View File

@@ -31,8 +31,7 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
cd /etc/wgdashboard/src
chmod u+x wgd.sh
$STD ./wgd.sh install
. /etc/os-release
if [ "$VERSION_CODENAME" = "trixie" ]; then
if [ "$(get_os_info codename)" = "trixie" ]; then
echo "net.ipv4.ip_forward=1" >>/etc/sysctl.d/sysctl.conf
$STD sysctl -p /etc/sysctl.d/sysctl.conf
else