From b650aa3066376267f2ba1c7b3b88bb7b0377ba4b Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 10 Jan 2026 08:50:02 +0000 Subject: [PATCH 01/26] GitHub bot: changelog --- addons_updater/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons_updater/CHANGELOG.md b/addons_updater/CHANGELOG.md index 1c015d366..3503d92c7 100644 --- a/addons_updater/CHANGELOG.md +++ b/addons_updater/CHANGELOG.md @@ -1,3 +1,5 @@ +## description: Automatic addons update by aligning version tag with upstream releases 3.19.16 (10-01-2026) +- Minor bugs fixed ## 3.19.16 (2026-01-10) - Add config option to choose ISO8601 (YYYY-MM-DD) or DD-MM-YYYY dates for last_update/changelog entries From 51af7fce7457f9af663c7a106166eb3699e33d21 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 10 Jan 2026 09:54:59 +0100 Subject: [PATCH 02/26] Update 91-configure.sh --- .../rootfs/etc/cont-init.d/91-configure.sh | 130 ++++++++++-------- 1 file changed, 69 insertions(+), 61 deletions(-) diff --git a/netalertx/rootfs/etc/cont-init.d/91-configure.sh b/netalertx/rootfs/etc/cont-init.d/91-configure.sh index 6e01cb376..a7d1679b7 100755 --- a/netalertx/rootfs/etc/cont-init.d/91-configure.sh +++ b/netalertx/rootfs/etc/cont-init.d/91-configure.sh @@ -8,28 +8,48 @@ set -e APP_UID=20211 -# 1. Fix the directories -for folder in /tmp/run/tmp /tmp/api /tmp/log /tmp/run /tmp/nginx/active-config "$TMP_DIR" "$NETALERTX_DATA" "$NETALERTX_DB" "$NETALERTX_CONFIG"; do - mkdir -p "$folder" - chown -R $APP_UID:$APP_UID "$folder" - chmod -R 755 "$folder" +# CRITICAL: ensure newly-created files (like /config/config/app.conf on first run) are not root-only +umask 022 +export UMASK=022 + +# Ensure base dirs exist and have sane perms for the app user +mkdir -p /config/config /config/db +chown -R "${APP_UID}:${APP_UID}" /config/config /config/db +chmod 775 /config/config /config/db + +# 1. Fix the directories (skip empty vars) +for folder in \ + /tmp/run/tmp \ + /tmp/api \ + /tmp/log \ + /tmp/run \ + /tmp/nginx/active-config \ + "${TMP_DIR:-}" \ + "${NETALERTX_DATA:-}" \ + "${NETALERTX_DB:-}" \ + "${NETALERTX_CONFIG:-}" +do + [[ -z "${folder}" ]] && continue + mkdir -p "${folder}" + chown -R "${APP_UID}:${APP_UID}" "${folder}" + chmod -R 755 "${folder}" done # 2. Fix /tmp and Standard Streams (CRITICAL) chmod -R 1777 /tmp -# This allows the non-root user to write to the container logs +# Allow non-root user to write to container logs chmod 666 /dev/stdout /dev/stderr # 3. Pre-create and chown log files touch /tmp/log/app.php_errors.log /tmp/log/cron.log /tmp/log/stdout.log /tmp/log/stderr.log -chown $APP_UID:$APP_UID /tmp/log/*.log +chown "${APP_UID}:${APP_UID}" /tmp/log/*.log # 4. Create Symlinks for item in db config; do - rm -rf "/data/$item" - ln -sf "/config/$item" "/data/$item" - chown -R $APP_UID:$APP_UID "/data/$item" - chmod -R 755 "/data/$item" + rm -rf "/data/${item}" + ln -sf "/config/${item}" "/data/${item}" + chown -R "${APP_UID}:${APP_UID}" "/data/${item}" + chmod -R 755 "/data/${item}" done # Fix php @@ -41,76 +61,64 @@ sed -i "/default_type/a include /etc/nginx/http.d/ingress.conf;" "${SYSTEM_NGINX # Configure network # ##################### -# Configuration file path config_file="/config/config/app.conf" -if [ -f /config/db/app.db ]; then - chmod a+rwx /config/db/app.db +# If DB already exists, ensure it’s readable/writable by the app user +if [[ -f /config/db/app.db ]]; then + chown "${APP_UID}:${APP_UID}" /config/db/app.db || true + chmod 664 /config/db/app.db || true fi -# Function to execute the main logic execute_main_logic() { bashio::log.info "Initiating scan of Home Assistant network configuration..." - # Get the local IPv4 address local_ip="$(bashio::network.ipv4_address)" - local_ip="${local_ip%/*}" # Remove CIDR notation - echo "... Detected local IP: $local_ip" + local_ip="${local_ip%/*}" + echo "... Detected local IP: ${local_ip}" echo "... Scanning network for changes" - # Ensure arp-scan is installed - if ! command -v arp-scan &> /dev/null; then + if ! command -v arp-scan &>/dev/null; then bashio::log.error "arp-scan command not found. Please install arp-scan to proceed." exit 1 fi - # Get current settings - if ! grep -q "^SCAN_SUBNETS" "$config_file"; then - bashio::log.fatal "SCAN_SUBNETS is not found in your $config_file, please correct your file first" + if [[ ! -f "${config_file}" ]]; then + bashio::log.warning "Config file not present yet (${config_file}); skipping network scan update." + return 0 fi - # Iterate over network interfaces - for interface in $(bashio::network.interfaces); do - echo "Scanning interface: $interface" + # Make sure the app user can read it (covers upgrades / odd umask cases) + chown "${APP_UID}:${APP_UID}" "${config_file}" 2>/dev/null || true + chmod 664 "${config_file}" 2>/dev/null || true - # Check if the interface is already configured - if grep -q "$interface" "$config_file"; then - echo "... $interface is already configured in app.conf" - else - # Update SCAN_SUBNETS in app.conf - SCAN_SUBNETS="$(grep "^SCAN_SUBNETS" "$config_file" | head -1)" - if [[ "$SCAN_SUBNETS" != *"$local_ip"*"$interface"* ]]; then - # Add to the app.conf - NEW_SCAN_SUBNETS="${SCAN_SUBNETS%]}, '${local_ip}/24 --interface=${interface}']" - sed -i "/^SCAN_SUBNETS/c\\$NEW_SCAN_SUBNETS" "$config_file" - # Check availability of hosts - VALUE="$(arp-scan --interface="$interface" "${local_ip}/24" 2> /dev/null \ - | grep "responded" \ - | awk -F'.' '{print $NF}' \ - | awk '{print $1}' || true)" - echo "... $interface is available in Home Assistant (with $VALUE devices), added to app.conf" - fi + if ! grep -q "^SCAN_SUBNETS" "${config_file}"; then + bashio::log.fatal "SCAN_SUBNETS is not found in ${config_file}, please correct your file first" + return 1 + fi + + for interface in $(bashio::network.interfaces); do + echo "Scanning interface: ${interface}" + + if grep -q "${interface}" "${config_file}"; then + echo "... ${interface} is already configured in app.conf" + continue + fi + + SCAN_SUBNETS="$(grep "^SCAN_SUBNETS" "${config_file}" | head -1)" + if [[ "${SCAN_SUBNETS}" != *"${local_ip}"*"${interface}"* ]]; then + NEW_SCAN_SUBNETS="${SCAN_SUBNETS%]}, '${local_ip}/24 --interface=${interface}']" + sed -i "/^SCAN_SUBNETS/c\\${NEW_SCAN_SUBNETS}" "${config_file}" + + VALUE="$(arp-scan --interface="${interface}" "${local_ip}/24" 2>/dev/null \ + | grep "responded" \ + | awk -F'.' '{print $NF}' \ + | awk '{print $1}' || true)" + + echo "... ${interface} is available in Home Assistant (with ${VALUE} devices), added to app.conf" fi done bashio::log.info "Network scan completed." - } -# Function to wait for the config file -wait_for_config_file() { - echo "Waiting for $config_file to become available..." - while [ ! -f "$config_file" ]; do - sleep 5 # Wait for 5 seconds before checking again - done - echo "$config_file is now available. Starting the script." - execute_main_logic -} - -# Main script logic -if [ -f "$config_file" ]; then - execute_main_logic -else - wait_for_config_file & - true -fi +execute_main_logic || true From ce8623f1c2d56209a882c53c5da9f8659ec2fcb6 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 10 Jan 2026 09:55:08 +0100 Subject: [PATCH 03/26] Update config.yaml --- netalertx/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netalertx/config.yaml b/netalertx/config.yaml index 5f2287709..c3c1197fd 100644 --- a/netalertx/config.yaml +++ b/netalertx/config.yaml @@ -50,4 +50,4 @@ slug: netalertx tmpfs: true udev: true url: https://github.com/alexbelgium/hassio-addons -version: 25.11.29-3 +version: 25.11.29-4 From 8a5e058f1b760c1a307b83a009df53b0cb532c6c Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 10 Jan 2026 08:57:16 +0000 Subject: [PATCH 04/26] GitHub bot: changelog --- netalertx/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/netalertx/CHANGELOG.md b/netalertx/CHANGELOG.md index 19558bd22..44e41e0ea 100644 --- a/netalertx/CHANGELOG.md +++ b/netalertx/CHANGELOG.md @@ -1,3 +1,5 @@ +## 25.11.29-4 (10-01-2026) +- Minor bugs fixed ## 25.11.29-3 (07-01-2026) - Minor bugs fixed ## 25.11.29-2 (06-01-2026) From 0f781792f6c7f94d630915479cb2759370f0ff27 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 10 Jan 2026 10:29:52 +0100 Subject: [PATCH 05/26] Update 91-configure.sh --- .../rootfs/etc/cont-init.d/91-configure.sh | 131 +++++++++--------- 1 file changed, 63 insertions(+), 68 deletions(-) diff --git a/netalertx/rootfs/etc/cont-init.d/91-configure.sh b/netalertx/rootfs/etc/cont-init.d/91-configure.sh index a7d1679b7..aedf5734f 100755 --- a/netalertx/rootfs/etc/cont-init.d/91-configure.sh +++ b/netalertx/rootfs/etc/cont-init.d/91-configure.sh @@ -8,48 +8,28 @@ set -e APP_UID=20211 -# CRITICAL: ensure newly-created files (like /config/config/app.conf on first run) are not root-only -umask 022 -export UMASK=022 - -# Ensure base dirs exist and have sane perms for the app user -mkdir -p /config/config /config/db -chown -R "${APP_UID}:${APP_UID}" /config/config /config/db -chmod 775 /config/config /config/db - -# 1. Fix the directories (skip empty vars) -for folder in \ - /tmp/run/tmp \ - /tmp/api \ - /tmp/log \ - /tmp/run \ - /tmp/nginx/active-config \ - "${TMP_DIR:-}" \ - "${NETALERTX_DATA:-}" \ - "${NETALERTX_DB:-}" \ - "${NETALERTX_CONFIG:-}" -do - [[ -z "${folder}" ]] && continue - mkdir -p "${folder}" - chown -R "${APP_UID}:${APP_UID}" "${folder}" - chmod -R 755 "${folder}" +# 1. Fix the directories +for folder in /tmp/run/tmp /tmp/api /tmp/log /tmp/run /tmp/nginx/active-config "$TMP_DIR" "$NETALERTX_DATA" "$NETALERTX_DB" "$NETALERTX_CONFIG"; do + mkdir -p "$folder" + chown -R $APP_UID:$APP_UID "$folder" + chmod -R 755 "$folder" done # 2. Fix /tmp and Standard Streams (CRITICAL) chmod -R 1777 /tmp -# Allow non-root user to write to container logs +# This allows the non-root user to write to the container logs chmod 666 /dev/stdout /dev/stderr # 3. Pre-create and chown log files touch /tmp/log/app.php_errors.log /tmp/log/cron.log /tmp/log/stdout.log /tmp/log/stderr.log -chown "${APP_UID}:${APP_UID}" /tmp/log/*.log +chown $APP_UID:$APP_UID /tmp/log/*.log # 4. Create Symlinks for item in db config; do - rm -rf "/data/${item}" - ln -sf "/config/${item}" "/data/${item}" - chown -R "${APP_UID}:${APP_UID}" "/data/${item}" - chmod -R 755 "/data/${item}" + rm -rf "/data/$item" + ln -sf "/config/$item" "/data/$item" + chown -R $APP_UID:$APP_UID "/data/$item" + chmod -R 755 "/data/$item" done # Fix php @@ -61,64 +41,79 @@ sed -i "/default_type/a include /etc/nginx/http.d/ingress.conf;" "${SYSTEM_NGINX # Configure network # ##################### +# Configuration file path config_file="/config/config/app.conf" -# If DB already exists, ensure it’s readable/writable by the app user -if [[ -f /config/db/app.db ]]; then - chown "${APP_UID}:${APP_UID}" /config/db/app.db || true - chmod 664 /config/db/app.db || true +if [ -f /config/db/app.db ]; then + chmod a+rwx /config/db/app.db fi +# Function to execute the main logic execute_main_logic() { bashio::log.info "Initiating scan of Home Assistant network configuration..." + # Get the local IPv4 address local_ip="$(bashio::network.ipv4_address)" - local_ip="${local_ip%/*}" - echo "... Detected local IP: ${local_ip}" + local_ip="${local_ip%/*}" # Remove CIDR notation + echo "... Detected local IP: $local_ip" echo "... Scanning network for changes" - if ! command -v arp-scan &>/dev/null; then + # Ensure arp-scan is installed + if ! command -v arp-scan &> /dev/null; then bashio::log.error "arp-scan command not found. Please install arp-scan to proceed." exit 1 fi - if [[ ! -f "${config_file}" ]]; then - bashio::log.warning "Config file not present yet (${config_file}); skipping network scan update." - return 0 - fi - - # Make sure the app user can read it (covers upgrades / odd umask cases) - chown "${APP_UID}:${APP_UID}" "${config_file}" 2>/dev/null || true - chmod 664 "${config_file}" 2>/dev/null || true - - if ! grep -q "^SCAN_SUBNETS" "${config_file}"; then - bashio::log.fatal "SCAN_SUBNETS is not found in ${config_file}, please correct your file first" - return 1 + # Get current settings + if ! grep -q "^SCAN_SUBNETS" "$config_file"; then + bashio::log.fatal "SCAN_SUBNETS is not found in your $config_file, please correct your file first" fi + # Iterate over network interfaces for interface in $(bashio::network.interfaces); do - echo "Scanning interface: ${interface}" + echo "Scanning interface: $interface" - if grep -q "${interface}" "${config_file}"; then - echo "... ${interface} is already configured in app.conf" - continue - fi - - SCAN_SUBNETS="$(grep "^SCAN_SUBNETS" "${config_file}" | head -1)" - if [[ "${SCAN_SUBNETS}" != *"${local_ip}"*"${interface}"* ]]; then - NEW_SCAN_SUBNETS="${SCAN_SUBNETS%]}, '${local_ip}/24 --interface=${interface}']" - sed -i "/^SCAN_SUBNETS/c\\${NEW_SCAN_SUBNETS}" "${config_file}" - - VALUE="$(arp-scan --interface="${interface}" "${local_ip}/24" 2>/dev/null \ - | grep "responded" \ - | awk -F'.' '{print $NF}' \ - | awk '{print $1}' || true)" - - echo "... ${interface} is available in Home Assistant (with ${VALUE} devices), added to app.conf" + # Check if the interface is already configured + if grep -q "$interface" "$config_file"; then + echo "... $interface is already configured in app.conf" + else + # Update SCAN_SUBNETS in app.conf + SCAN_SUBNETS="$(grep "^SCAN_SUBNETS" "$config_file" | head -1)" + if [[ "$SCAN_SUBNETS" != *"$local_ip"*"$interface"* ]]; then + # Add to the app.conf + NEW_SCAN_SUBNETS="${SCAN_SUBNETS%]}, '${local_ip}/24 --interface=${interface}']" + sed -i "/^SCAN_SUBNETS/c\\$NEW_SCAN_SUBNETS" "$config_file" + # Check availability of hosts + VALUE="$(arp-scan --interface="$interface" "${local_ip}/24" 2> /dev/null \ + | grep "responded" \ + | awk -F'.' '{print $NF}' \ + | awk '{print $1}' || true)" + echo "... $interface is available in Home Assistant (with $VALUE devices), added to app.conf" + fi fi done bashio::log.info "Network scan completed." + } -execute_main_logic || true +# Function to wait for the config file +wait_for_config_file() { + if [ ! -f "$config_file" ]; then + echo "Waiting for $config_file to become available..." + while [ ! -f "$config_file" ]; do + sleep 5 # Wait for 5 seconds before checking again + done + echo "$config_file is now available. Restarting the addon." + bashio::addon.restart + fi + execute_main_logic +} + +# Main script logic +if [ -f "$config_file" ]; then + execute_main_logic +else + wait_for_config_file & + true +fi From 6b2f25e290afea35c478ba4f721f316031e2b2cb Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 10 Jan 2026 10:30:31 +0100 Subject: [PATCH 06/26] Update config.yaml --- netalertx/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netalertx/config.yaml b/netalertx/config.yaml index c3c1197fd..7caf1641e 100644 --- a/netalertx/config.yaml +++ b/netalertx/config.yaml @@ -50,4 +50,4 @@ slug: netalertx tmpfs: true udev: true url: https://github.com/alexbelgium/hassio-addons -version: 25.11.29-4 +version: 25.11.29-5 From ae845c40d1ea22ed97742a014dea14d8c310d57f Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 10 Jan 2026 09:32:23 +0000 Subject: [PATCH 07/26] GitHub bot: changelog --- netalertx/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/netalertx/CHANGELOG.md b/netalertx/CHANGELOG.md index 44e41e0ea..1142ffd6a 100644 --- a/netalertx/CHANGELOG.md +++ b/netalertx/CHANGELOG.md @@ -1,3 +1,5 @@ +## 25.11.29-5 (10-01-2026) +- Minor bugs fixed ## 25.11.29-4 (10-01-2026) - Minor bugs fixed ## 25.11.29-3 (07-01-2026) From aefcda34aca8729304203aa92edc2b79886681d3 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 10 Jan 2026 16:43:41 +0100 Subject: [PATCH 08/26] Refactor configure.sh for better directory handling Refactor configuration script to improve directory management, permissions, and application logic. --- .../rootfs/etc/cont-init.d/91-configure.sh | 282 ++++++++++++------ 1 file changed, 193 insertions(+), 89 deletions(-) diff --git a/netalertx/rootfs/etc/cont-init.d/91-configure.sh b/netalertx/rootfs/etc/cont-init.d/91-configure.sh index aedf5734f..25e19ae09 100755 --- a/netalertx/rootfs/etc/cont-init.d/91-configure.sh +++ b/netalertx/rootfs/etc/cont-init.d/91-configure.sh @@ -2,118 +2,222 @@ # shellcheck shell=bash set -e -#################### -# Update structure # -#################### - APP_UID=20211 +APP_GID=20211 -# 1. Fix the directories -for folder in /tmp/run/tmp /tmp/api /tmp/log /tmp/run /tmp/nginx/active-config "$TMP_DIR" "$NETALERTX_DATA" "$NETALERTX_DB" "$NETALERTX_CONFIG"; do - mkdir -p "$folder" - chown -R $APP_UID:$APP_UID "$folder" - chmod -R 755 "$folder" -done +: "${TMP_DIR:=/tmp}" +: "${NETALERTX_DATA:=/config}" +: "${NETALERTX_DB:=/config/db}" +: "${NETALERTX_CONFIG:=/config/config}" +: "${SYSTEM_NGINX_CONFIG_TEMPLATE:=/etc/nginx/nginx.conf.template}" -# 2. Fix /tmp and Standard Streams (CRITICAL) -chmod -R 1777 /tmp -# This allows the non-root user to write to the container logs -chmod 666 /dev/stdout /dev/stderr +config_file="/config/config/app.conf" + +# State files (persistent across restarts) +state_dir="/config/.netalertx_state" +sig_file="$state_dir/appconf.sha256" +restart_lock="$state_dir/restart_in_progress" + +mkdir -p "$state_dir" + +############################## +# Create required directories # +############################## + +mkdir -p \ + /config /config/db /config/config \ + /data \ + /tmp/run/tmp /tmp/api /tmp/log /tmp/run /tmp/nginx/active-config \ + "$TMP_DIR" \ + "$NETALERTX_DATA" \ + "$NETALERTX_DB" \ + "$NETALERTX_CONFIG" + +# Best-effort perms (don’t fail on edge cases) +chown -R "$APP_UID:$APP_GID" /config/db /config/config "$NETALERTX_DB" "$NETALERTX_CONFIG" \ + /tmp/run/tmp /tmp/api /tmp/log /tmp/run /tmp/nginx/active-config "$TMP_DIR" 2>/dev/null || true +chmod -R 755 /config/db /config/config "$NETALERTX_DB" "$NETALERTX_CONFIG" \ + /tmp/run/tmp /tmp/api /tmp/log /tmp/run /tmp/nginx/active-config "$TMP_DIR" 2>/dev/null || true + +chmod -R 1777 /tmp 2>/dev/null || true +chmod 666 /dev/stdout /dev/stderr 2>/dev/null || true -# 3. Pre-create and chown log files touch /tmp/log/app.php_errors.log /tmp/log/cron.log /tmp/log/stdout.log /tmp/log/stderr.log -chown $APP_UID:$APP_UID /tmp/log/*.log +chown "$APP_UID:$APP_GID" /tmp/log/*.log 2>/dev/null || true +chmod 644 /tmp/log/*.log 2>/dev/null || true -# 4. Create Symlinks -for item in db config; do - rm -rf "/data/$item" - ln -sf "/config/$item" "/data/$item" - chown -R $APP_UID:$APP_UID "/data/$item" - chmod -R 755 "/data/$item" -done +# /data symlinks -> /config +rm -rf /data/db /data/config +ln -sf /config/db /data/db +ln -sf /config/config /data/config -# Fix php -sed -i 's|>>"\?/tmp/log/app\.php_errors\.log"\? 2>/dev/stderr|>>"/tmp/log/app.php_errors.log"|g' /services/start-php-fpm.sh -sed -i 's|TEMP_CONFIG_FILE=$(mktemp "${TMP_DIR}/netalertx\.conf\.XXXXXX")|TEMP_CONFIG_FILE=$(mktemp -p "${TMP_DIR:-/tmp}" netalertx.conf.XXXXXX)|' /services/start-php-fpm.sh -sed -i "/default_type/a include /etc/nginx/http.d/ingress.conf;" "${SYSTEM_NGINX_CONFIG_TEMPLATE}" +################ +# Fix scripts # +################ + +if [ -f /services/start-php-fpm.sh ]; then + sed -i 's|>>"\?/tmp/log/app\.php_errors\.log"\? 2>/dev/stderr|>>"/tmp/log/app.php_errors.log"|g' /services/start-php-fpm.sh + sed -i 's|TEMP_CONFIG_FILE=$(mktemp "${TMP_DIR}/netalertx\.conf\.XXXXXX")|TEMP_CONFIG_FILE=$(mktemp -p "${TMP_DIR:-/tmp}" netalertx.conf.XXXXXX)|' /services/start-php-fpm.sh +fi + +if [ -n "${SYSTEM_NGINX_CONFIG_TEMPLATE:-}" ] && [ -f "${SYSTEM_NGINX_CONFIG_TEMPLATE:-}" ]; then + sed -i '/default_type/a include /etc/nginx/http.d/ingress.conf;' "${SYSTEM_NGINX_CONFIG_TEMPLATE}" 2>/dev/null || true +fi + +##################### +# Helper: signature # +##################### + +appconf_signature() { + # Prints sha256 or nothing if missing + if [ -f "$config_file" ]; then + sha256sum "$config_file" | awk '{print $1}' + fi +} + +record_signature() { + sig="$(appconf_signature || true)" + if [ -n "${sig:-}" ]; then + printf '%s\n' "$sig" >"$sig_file" + fi +} + +signature_changed_or_unknown() { + # Returns 0 (true) if app.conf exists and signature differs from recorded (or no recorded signature) + [ -f "$config_file" ] || return 1 + current="$(appconf_signature || true)" + [ -n "${current:-}" ] || return 1 + + if [ ! -f "$sig_file" ]; then + return 0 + fi + + recorded="$(cat "$sig_file" 2>/dev/null || true)" + [ "$current" != "$recorded" ] +} + +############################################# +# One-time restart when app.conf is created # +############################################# + +wait_for_appconf_then_restart_once() { + # Prevent concurrent watcher restarts + if [ -f "$restart_lock" ]; then + exit 0 + fi + touch "$restart_lock" || true + + bashio::log.info "Waiting for NetAlertX to create $config_file ..." + + while [ ! -f "$config_file" ]; do + sleep 2 + done + + # Wait for stability (size unchanged across checks) + last_size="" + stable_count=0 + while [ "$stable_count" -lt 3 ]; do + size="$(wc -c <"$config_file" 2>/dev/null || echo 0)" + if [ "$size" = "$last_size" ] && [ "$size" -gt 0 ]; then + stable_count=$((stable_count + 1)) + else + stable_count=0 + fi + last_size="$size" + sleep 2 + done + + # Record signature so we don't re-restart for the same file + record_signature + + bashio::log.notice "app.conf detected and stable. Restarting add-on once." + rm -f "$restart_lock" 2>/dev/null || true + bashio::addon.restart +} ##################### # Configure network # ##################### -# Configuration file path -config_file="/config/config/app.conf" - -if [ -f /config/db/app.db ]; then - chmod a+rwx /config/db/app.db -fi - -# Function to execute the main logic execute_main_logic() { - bashio::log.info "Initiating scan of Home Assistant network configuration..." + bashio::log.info "Initiating scan of Home Assistant network configuration..." - # Get the local IPv4 address - local_ip="$(bashio::network.ipv4_address)" - local_ip="${local_ip%/*}" # Remove CIDR notation - echo "... Detected local IP: $local_ip" - echo "... Scanning network for changes" + local_ip="$(bashio::network.ipv4_address | head -n 1)" + local_ip="${local_ip%/*}" - # Ensure arp-scan is installed - if ! command -v arp-scan &> /dev/null; then - bashio::log.error "arp-scan command not found. Please install arp-scan to proceed." - exit 1 + if [ -z "$local_ip" ]; then + bashio::log.error "Could not determine local IPv4 address" + return 0 + fi + + if ! command -v arp-scan >/dev/null 2>&1; then + bashio::log.error "arp-scan command not found." + exit 1 + fi + + if [ ! -f "$config_file" ]; then + bashio::log.warning "$config_file missing; nothing to update." + return 0 + fi + + if ! grep -q "^SCAN_SUBNETS" "$config_file"; then + bashio::log.fatal "SCAN_SUBNETS is not found in $config_file" + exit 1 + fi + + for interface in $(bashio::network.interfaces); do + bashio::log.info "Scanning interface: $interface" + + if grep -q -- "$interface" "$config_file"; then + continue fi - # Get current settings - if ! grep -q "^SCAN_SUBNETS" "$config_file"; then - bashio::log.fatal "SCAN_SUBNETS is not found in your $config_file, please correct your file first" + SCAN_SUBNETS="$(grep "^SCAN_SUBNETS" "$config_file" | head -n 1)" + + if [[ "$SCAN_SUBNETS" == *"$local_ip"*"$interface"* ]]; then + continue fi - # Iterate over network interfaces - for interface in $(bashio::network.interfaces); do - echo "Scanning interface: $interface" + if [[ "$SCAN_SUBNETS" =~ ^SCAN_SUBNETS=\[\]$ ]]; then + NEW_SCAN_SUBNETS="SCAN_SUBNETS=['${local_ip}/24 --interface=${interface}']" + else + NEW_SCAN_SUBNETS="${SCAN_SUBNETS%]} , '${local_ip}/24 --interface=${interface}']" + fi - # Check if the interface is already configured - if grep -q "$interface" "$config_file"; then - echo "... $interface is already configured in app.conf" - else - # Update SCAN_SUBNETS in app.conf - SCAN_SUBNETS="$(grep "^SCAN_SUBNETS" "$config_file" | head -1)" - if [[ "$SCAN_SUBNETS" != *"$local_ip"*"$interface"* ]]; then - # Add to the app.conf - NEW_SCAN_SUBNETS="${SCAN_SUBNETS%]}, '${local_ip}/24 --interface=${interface}']" - sed -i "/^SCAN_SUBNETS/c\\$NEW_SCAN_SUBNETS" "$config_file" - # Check availability of hosts - VALUE="$(arp-scan --interface="$interface" "${local_ip}/24" 2> /dev/null \ - | grep "responded" \ - | awk -F'.' '{print $NF}' \ - | awk '{print $1}' || true)" - echo "... $interface is available in Home Assistant (with $VALUE devices), added to app.conf" - fi - fi - done + sed -i "/^SCAN_SUBNETS/c\\$NEW_SCAN_SUBNETS" "$config_file" - bashio::log.info "Network scan completed." + VALUE="$( + arp-scan --interface="$interface" "${local_ip}/24" 2>/dev/null \ + | grep "responded" \ + | awk -F'.' '{print $NF}' \ + | awk '{print $1}' || true + )" + bashio::log.info "Added ${interface} (${VALUE:-0} devices) to SCAN_SUBNETS" + done + + # Update signature after modifications + record_signature + bashio::log.info "Network scan completed." } -# Function to wait for the config file -wait_for_config_file() { - if [ ! -f "$config_file" ]; then - echo "Waiting for $config_file to become available..." - while [ ! -f "$config_file" ]; do - sleep 5 # Wait for 5 seconds before checking again - done - echo "$config_file is now available. Restarting the addon." - bashio::addon.restart - fi - execute_main_logic -} +################### +# Main entrypoint # +################### -# Main script logic -if [ -f "$config_file" ]; then - execute_main_logic -else - wait_for_config_file & - true +# Case 1: app.conf is missing -> let NetAlertX generate it, then restart once. +if [ ! -f "$config_file" ]; then + wait_for_appconf_then_restart_once & + exit 0 fi + +# Case 2: app.conf exists but is "new" (user deleted/recreated, or NetAlertX regenerated) +# => restart once to allow NetAlertX to re-bootstrap cleanly, then continue on next boot. +if signature_changed_or_unknown; then + bashio::log.notice "Detected new or changed app.conf instance; restarting add-on once to re-bootstrap." + record_signature + bashio::addon.restart +fi + +# Normal run +execute_main_logic From 25d5b8f3ae0bede43f59ac008abccd093309b6e1 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 10 Jan 2026 16:43:57 +0100 Subject: [PATCH 09/26] Update version to 25.11.29-6 --- netalertx/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netalertx/config.yaml b/netalertx/config.yaml index 7caf1641e..a1b6d6d28 100644 --- a/netalertx/config.yaml +++ b/netalertx/config.yaml @@ -50,4 +50,4 @@ slug: netalertx tmpfs: true udev: true url: https://github.com/alexbelgium/hassio-addons -version: 25.11.29-5 +version: 25.11.29-6 From 44b3bc20f3620e6ecff943df82761efbc46f631c Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 10 Jan 2026 15:45:50 +0000 Subject: [PATCH 10/26] GitHub bot: changelog --- netalertx/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/netalertx/CHANGELOG.md b/netalertx/CHANGELOG.md index 1142ffd6a..5a15f06f5 100644 --- a/netalertx/CHANGELOG.md +++ b/netalertx/CHANGELOG.md @@ -1,3 +1,5 @@ +## 25.11.29-6 (10-01-2026) +- Minor bugs fixed ## 25.11.29-5 (10-01-2026) - Minor bugs fixed ## 25.11.29-4 (10-01-2026) From ccaf09ae7ea03a01752e3f0e748b0dd70777adfd Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 10 Jan 2026 16:53:10 +0100 Subject: [PATCH 11/26] Refactor 91-configure.sh for improved structure --- .../rootfs/etc/cont-init.d/91-configure.sh | 280 ++++++------------ 1 file changed, 87 insertions(+), 193 deletions(-) diff --git a/netalertx/rootfs/etc/cont-init.d/91-configure.sh b/netalertx/rootfs/etc/cont-init.d/91-configure.sh index 25e19ae09..c978aee27 100755 --- a/netalertx/rootfs/etc/cont-init.d/91-configure.sh +++ b/netalertx/rootfs/etc/cont-init.d/91-configure.sh @@ -2,222 +2,116 @@ # shellcheck shell=bash set -e +#################### +# Update structure # +#################### + APP_UID=20211 -APP_GID=20211 -: "${TMP_DIR:=/tmp}" -: "${NETALERTX_DATA:=/config}" -: "${NETALERTX_DB:=/config/db}" -: "${NETALERTX_CONFIG:=/config/config}" -: "${SYSTEM_NGINX_CONFIG_TEMPLATE:=/etc/nginx/nginx.conf.template}" +# 1. Fix the directories +for folder in /tmp/run/tmp /tmp/api /tmp/log /tmp/run /tmp/nginx/active-config "$TMP_DIR" "$NETALERTX_DATA" "$NETALERTX_DB" "$NETALERTX_CONFIG"; do + mkdir -p "$folder" + chown -R $APP_UID:$APP_UID "$folder" + chmod -R 755 "$folder" +done -config_file="/config/config/app.conf" - -# State files (persistent across restarts) -state_dir="/config/.netalertx_state" -sig_file="$state_dir/appconf.sha256" -restart_lock="$state_dir/restart_in_progress" - -mkdir -p "$state_dir" - -############################## -# Create required directories # -############################## - -mkdir -p \ - /config /config/db /config/config \ - /data \ - /tmp/run/tmp /tmp/api /tmp/log /tmp/run /tmp/nginx/active-config \ - "$TMP_DIR" \ - "$NETALERTX_DATA" \ - "$NETALERTX_DB" \ - "$NETALERTX_CONFIG" - -# Best-effort perms (don’t fail on edge cases) -chown -R "$APP_UID:$APP_GID" /config/db /config/config "$NETALERTX_DB" "$NETALERTX_CONFIG" \ - /tmp/run/tmp /tmp/api /tmp/log /tmp/run /tmp/nginx/active-config "$TMP_DIR" 2>/dev/null || true -chmod -R 755 /config/db /config/config "$NETALERTX_DB" "$NETALERTX_CONFIG" \ - /tmp/run/tmp /tmp/api /tmp/log /tmp/run /tmp/nginx/active-config "$TMP_DIR" 2>/dev/null || true - -chmod -R 1777 /tmp 2>/dev/null || true -chmod 666 /dev/stdout /dev/stderr 2>/dev/null || true +# 2. Fix /tmp and Standard Streams (CRITICAL) +chmod -R 1777 /tmp +# This allows the non-root user to write to the container logs +chmod 666 /dev/stdout /dev/stderr +# 3. Pre-create and chown log files touch /tmp/log/app.php_errors.log /tmp/log/cron.log /tmp/log/stdout.log /tmp/log/stderr.log -chown "$APP_UID:$APP_GID" /tmp/log/*.log 2>/dev/null || true -chmod 644 /tmp/log/*.log 2>/dev/null || true +chown $APP_UID:$APP_UID /tmp/log/*.log -# /data symlinks -> /config -rm -rf /data/db /data/config -ln -sf /config/db /data/db -ln -sf /config/config /data/config +# 4. Create Symlinks +for item in db config; do + rm -rf "/data/$item" + ln -sf "/config/$item" "/data/$item" + chown -R $APP_UID:$APP_UID "/data/$item" + chmod -R 755 "/data/$item" +done -################ -# Fix scripts # -################ - -if [ -f /services/start-php-fpm.sh ]; then - sed -i 's|>>"\?/tmp/log/app\.php_errors\.log"\? 2>/dev/stderr|>>"/tmp/log/app.php_errors.log"|g' /services/start-php-fpm.sh - sed -i 's|TEMP_CONFIG_FILE=$(mktemp "${TMP_DIR}/netalertx\.conf\.XXXXXX")|TEMP_CONFIG_FILE=$(mktemp -p "${TMP_DIR:-/tmp}" netalertx.conf.XXXXXX)|' /services/start-php-fpm.sh -fi - -if [ -n "${SYSTEM_NGINX_CONFIG_TEMPLATE:-}" ] && [ -f "${SYSTEM_NGINX_CONFIG_TEMPLATE:-}" ]; then - sed -i '/default_type/a include /etc/nginx/http.d/ingress.conf;' "${SYSTEM_NGINX_CONFIG_TEMPLATE}" 2>/dev/null || true -fi - -##################### -# Helper: signature # -##################### - -appconf_signature() { - # Prints sha256 or nothing if missing - if [ -f "$config_file" ]; then - sha256sum "$config_file" | awk '{print $1}' - fi -} - -record_signature() { - sig="$(appconf_signature || true)" - if [ -n "${sig:-}" ]; then - printf '%s\n' "$sig" >"$sig_file" - fi -} - -signature_changed_or_unknown() { - # Returns 0 (true) if app.conf exists and signature differs from recorded (or no recorded signature) - [ -f "$config_file" ] || return 1 - current="$(appconf_signature || true)" - [ -n "${current:-}" ] || return 1 - - if [ ! -f "$sig_file" ]; then - return 0 - fi - - recorded="$(cat "$sig_file" 2>/dev/null || true)" - [ "$current" != "$recorded" ] -} - -############################################# -# One-time restart when app.conf is created # -############################################# - -wait_for_appconf_then_restart_once() { - # Prevent concurrent watcher restarts - if [ -f "$restart_lock" ]; then - exit 0 - fi - touch "$restart_lock" || true - - bashio::log.info "Waiting for NetAlertX to create $config_file ..." - - while [ ! -f "$config_file" ]; do - sleep 2 - done - - # Wait for stability (size unchanged across checks) - last_size="" - stable_count=0 - while [ "$stable_count" -lt 3 ]; do - size="$(wc -c <"$config_file" 2>/dev/null || echo 0)" - if [ "$size" = "$last_size" ] && [ "$size" -gt 0 ]; then - stable_count=$((stable_count + 1)) - else - stable_count=0 - fi - last_size="$size" - sleep 2 - done - - # Record signature so we don't re-restart for the same file - record_signature - - bashio::log.notice "app.conf detected and stable. Restarting add-on once." - rm -f "$restart_lock" 2>/dev/null || true - bashio::addon.restart -} +# Fix php +sed -i 's|>>"\?/tmp/log/app\.php_errors\.log"\? 2>/dev/stderr|>>"/tmp/log/app.php_errors.log"|g' /services/start-php-fpm.sh +sed -i 's|TEMP_CONFIG_FILE=$(mktemp "${TMP_DIR}/netalertx\.conf\.XXXXXX")|TEMP_CONFIG_FILE=$(mktemp -p "${TMP_DIR:-/tmp}" netalertx.conf.XXXXXX)|' /services/start-php-fpm.sh +sed -i "/default_type/a include /etc/nginx/http.d/ingress.conf;" "${SYSTEM_NGINX_CONFIG_TEMPLATE}" ##################### # Configure network # ##################### +# Configuration file path +config_file="/config/config/app.conf" + +if [ -f /config/db/app.db ]; then + chmod a+rwx /config/db/app.db +fi + +# Function to execute the main logic execute_main_logic() { - bashio::log.info "Initiating scan of Home Assistant network configuration..." + bashio::log.info "Initiating scan of Home Assistant network configuration..." - local_ip="$(bashio::network.ipv4_address | head -n 1)" - local_ip="${local_ip%/*}" + # Get the local IPv4 address + local_ip="$(bashio::network.ipv4_address)" + local_ip="${local_ip%/*}" # Remove CIDR notation + echo "... Detected local IP: $local_ip" + echo "... Scanning network for changes" - if [ -z "$local_ip" ]; then - bashio::log.error "Could not determine local IPv4 address" - return 0 - fi - - if ! command -v arp-scan >/dev/null 2>&1; then - bashio::log.error "arp-scan command not found." - exit 1 - fi - - if [ ! -f "$config_file" ]; then - bashio::log.warning "$config_file missing; nothing to update." - return 0 - fi - - if ! grep -q "^SCAN_SUBNETS" "$config_file"; then - bashio::log.fatal "SCAN_SUBNETS is not found in $config_file" - exit 1 - fi - - for interface in $(bashio::network.interfaces); do - bashio::log.info "Scanning interface: $interface" - - if grep -q -- "$interface" "$config_file"; then - continue + # Ensure arp-scan is installed + if ! command -v arp-scan &> /dev/null; then + bashio::log.error "arp-scan command not found. Please install arp-scan to proceed." + exit 1 fi - SCAN_SUBNETS="$(grep "^SCAN_SUBNETS" "$config_file" | head -n 1)" - - if [[ "$SCAN_SUBNETS" == *"$local_ip"*"$interface"* ]]; then - continue + # Get current settings + if ! grep -q "^SCAN_SUBNETS" "$config_file"; then + bashio::log.fatal "SCAN_SUBNETS is not found in your $config_file, please correct your file first" fi - if [[ "$SCAN_SUBNETS" =~ ^SCAN_SUBNETS=\[\]$ ]]; then - NEW_SCAN_SUBNETS="SCAN_SUBNETS=['${local_ip}/24 --interface=${interface}']" - else - NEW_SCAN_SUBNETS="${SCAN_SUBNETS%]} , '${local_ip}/24 --interface=${interface}']" - fi + # Iterate over network interfaces + for interface in $(bashio::network.interfaces); do + echo "Scanning interface: $interface" - sed -i "/^SCAN_SUBNETS/c\\$NEW_SCAN_SUBNETS" "$config_file" + # Check if the interface is already configured + if grep -q "$interface" "$config_file"; then + echo "... $interface is already configured in app.conf" + else + # Update SCAN_SUBNETS in app.conf + SCAN_SUBNETS="$(grep "^SCAN_SUBNETS" "$config_file" | head -1)" + if [[ "$SCAN_SUBNETS" != *"$local_ip"*"$interface"* ]]; then + # Add to the app.conf + NEW_SCAN_SUBNETS="${SCAN_SUBNETS%]}, '${local_ip}/24 --interface=${interface}']" + sed -i "/^SCAN_SUBNETS/c\\$NEW_SCAN_SUBNETS" "$config_file" + # Check availability of hosts + VALUE="$(arp-scan --interface="$interface" "${local_ip}/24" 2> /dev/null \ + | grep "responded" \ + | awk -F'.' '{print $NF}' \ + | awk '{print $1}' || true)" + echo "... $interface is available in Home Assistant (with $VALUE devices), added to app.conf" + fi + fi + done - VALUE="$( - arp-scan --interface="$interface" "${local_ip}/24" 2>/dev/null \ - | grep "responded" \ - | awk -F'.' '{print $NF}' \ - | awk '{print $1}' || true - )" + bashio::log.info "Network scan completed." - bashio::log.info "Added ${interface} (${VALUE:-0} devices) to SCAN_SUBNETS" - done - - # Update signature after modifications - record_signature - bashio::log.info "Network scan completed." } -################### -# Main entrypoint # -################### +# Function to wait for the config file +wait_for_config_file() { + echo "Waiting for $config_file to become available..." + while [ ! -f "$config_file" ]; do + sleep 1 + done + echo "$config_file is now available. Rebooting the addon." + bashio::addon.restart + execute_main_logic +} -# Case 1: app.conf is missing -> let NetAlertX generate it, then restart once. -if [ ! -f "$config_file" ]; then - wait_for_appconf_then_restart_once & - exit 0 +# Main script logic +if [ -f "$config_file" ]; then + execute_main_logic +else + wait_for_config_file & + true fi - -# Case 2: app.conf exists but is "new" (user deleted/recreated, or NetAlertX regenerated) -# => restart once to allow NetAlertX to re-bootstrap cleanly, then continue on next boot. -if signature_changed_or_unknown; then - bashio::log.notice "Detected new or changed app.conf instance; restarting add-on once to re-bootstrap." - record_signature - bashio::addon.restart -fi - -# Normal run -execute_main_logic From 48350b442e2bc0c278dbc6fc72869a4b455b2092 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 10 Jan 2026 16:53:29 +0100 Subject: [PATCH 12/26] Remove call to execute_main_logic before reboot --- netalertx/rootfs/etc/cont-init.d/91-configure.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/netalertx/rootfs/etc/cont-init.d/91-configure.sh b/netalertx/rootfs/etc/cont-init.d/91-configure.sh index c978aee27..f4840cdfa 100755 --- a/netalertx/rootfs/etc/cont-init.d/91-configure.sh +++ b/netalertx/rootfs/etc/cont-init.d/91-configure.sh @@ -105,7 +105,6 @@ wait_for_config_file() { done echo "$config_file is now available. Rebooting the addon." bashio::addon.restart - execute_main_logic } # Main script logic From 72ded2381a9b22f342a11f4d72a59beb3da3a263 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 10 Jan 2026 16:53:37 +0100 Subject: [PATCH 13/26] Update config.yaml --- netalertx/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netalertx/config.yaml b/netalertx/config.yaml index a1b6d6d28..4755389de 100644 --- a/netalertx/config.yaml +++ b/netalertx/config.yaml @@ -50,4 +50,4 @@ slug: netalertx tmpfs: true udev: true url: https://github.com/alexbelgium/hassio-addons -version: 25.11.29-6 +version: 25.11.29-7 From f6d7c7a2f6c677d83c105ffb2b12260d60e5d5ef Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 10 Jan 2026 16:54:20 +0100 Subject: [PATCH 14/26] Update config.yaml --- jellyfin/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jellyfin/config.yaml b/jellyfin/config.yaml index 010999d50..0f878be99 100644 --- a/jellyfin/config.yaml +++ b/jellyfin/config.yaml @@ -73,7 +73,7 @@ devices: - /dev/nvme1 - /dev/nvme2 environment: - - ATTACHED_DEVICES_PERMS: "/dev/dri /dev/dvb /dev/vchiq /dev/vc-mem /dev/video1? -type c -o -type f" + - ATTACHED_DEVICES_PERMS: '/dev/dri /dev/dvb /dev/vchiq /dev/vc-mem /dev/video1? -type c -o -type f' host_dbus: true host_network: true image: ghcr.io/alexbelgium/jellyfin-{arch} From e147545198cd99dab3f029eb849091fbf1d7beb8 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 10 Jan 2026 15:55:32 +0000 Subject: [PATCH 15/26] GitHub bot: changelog --- netalertx/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/netalertx/CHANGELOG.md b/netalertx/CHANGELOG.md index 5a15f06f5..26f751ff1 100644 --- a/netalertx/CHANGELOG.md +++ b/netalertx/CHANGELOG.md @@ -1,3 +1,5 @@ +## 25.11.29-7 (10-01-2026) +- Minor bugs fixed ## 25.11.29-6 (10-01-2026) - Minor bugs fixed ## 25.11.29-5 (10-01-2026) From 4160222730947ed9a16cb6789037a55514e786cb Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 10 Jan 2026 17:20:05 +0100 Subject: [PATCH 16/26] Nobuild --- organizr/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/organizr/config.yaml b/organizr/config.yaml index 3874b7d01..a1928e852 100644 --- a/organizr/config.yaml +++ b/organizr/config.yaml @@ -86,5 +86,5 @@ schema: slug: organizr udev: true url: https://github.com/alexbelgium/hassio-addons -version: "1.601" +version: "1.90-bugfix2" webui: "[PROTO:ssl]://[HOST]:[PORT:80]" From 06e11ee23e6372c2f8aa8cdbf90d586325f34e75 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 10 Jan 2026 18:13:13 +0100 Subject: [PATCH 17/26] nobuild --- netalertx_fa/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netalertx_fa/config.yaml b/netalertx_fa/config.yaml index 4a3d6d18a..4b2b9a8ae 100644 --- a/netalertx_fa/config.yaml +++ b/netalertx_fa/config.yaml @@ -51,4 +51,4 @@ slug: netalertx_fa tmpfs: true udev: true url: https://github.com/alexbelgium/hassio-addons -version: 25.10.1-3 +version: 25.10.1-7 From 972d1877b57e3dc45fc4ce719c1cecb2789dca20 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 10 Jan 2026 18:13:44 +0100 Subject: [PATCH 18/26] Fix indentation for ATTACHED_DEVICES_PERMS --- jellyfin/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jellyfin/config.yaml b/jellyfin/config.yaml index 0f878be99..f4932594d 100644 --- a/jellyfin/config.yaml +++ b/jellyfin/config.yaml @@ -73,7 +73,7 @@ devices: - /dev/nvme1 - /dev/nvme2 environment: - - ATTACHED_DEVICES_PERMS: '/dev/dri /dev/dvb /dev/vchiq /dev/vc-mem /dev/video1? -type c -o -type f' + ATTACHED_DEVICES_PERMS: '/dev/dri /dev/dvb /dev/vchiq /dev/vc-mem /dev/video1? -type c -o -type f' host_dbus: true host_network: true image: ghcr.io/alexbelgium/jellyfin-{arch} From 16487c674b7762857f7e28e4caa447303345605c Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 10 Jan 2026 18:21:42 +0100 Subject: [PATCH 19/26] Add paused field to updater.json --- organizr/updater.json | 1 + 1 file changed, 1 insertion(+) diff --git a/organizr/updater.json b/organizr/updater.json index f64f4d950..816862eab 100644 --- a/organizr/updater.json +++ b/organizr/updater.json @@ -1,5 +1,6 @@ { "last_update": "27-12-2025", + "paused": true, "repository": "alexbelgium/hassio-addons", "slug": "organizr", "source": "github", From 0866efe4cf668ae9b90e774726ac14189e4695f0 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 10 Jan 2026 18:32:56 +0100 Subject: [PATCH 20/26] Implement append_unique_line function Added a helper function to append unique lines to files. --- .templates/01-config_yaml.sh | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/.templates/01-config_yaml.sh b/.templates/01-config_yaml.sh index 9cff28cd0..245bb9222 100755 --- a/.templates/01-config_yaml.sh +++ b/.templates/01-config_yaml.sh @@ -135,6 +135,16 @@ sed -i 's/: /=/' /tempenv SECRETSFILE="/config/secrets.yaml" if [ ! -f "$SECRETSFILE" ]; then SECRETSFILE="/homeassistant/secrets.yaml"; fi +# --- minimal helper: append line only if missing +append_unique_line() { + # $1=file, $2=line + local _file="$1" + local _line="$2" + mkdir -p "$(dirname "$_file")" 2>/dev/null || true + touch "$_file" 2>/dev/null || true + grep -qxF -- "$_line" "$_file" 2>/dev/null || echo "$_line" >> "$_file" +} + while IFS= read -r line; do # Skip empty lines if [[ -z "$line" ]]; then @@ -164,12 +174,9 @@ while IFS= read -r line; do # extract keys and values KEYS="${line%%=*}" VALUE="${line#*=}" - # Check if VALUE is quoted - #if [[ "$VALUE" != \"*\" ]] && [[ "$VALUE" != \'*\' ]]; then - # VALUE="\"$VALUE\"" - #fi line="${KEYS}=${VALUE}" export "$line" + # export to python if command -v "python3" &> /dev/null; then [ ! -f /env.py ] && echo "import os" > /env.py @@ -178,20 +185,29 @@ while IFS= read -r line; do echo "os.environ['${KEYS}'] = '${VALUE_ESCAPED}'" >> /env.py python3 /env.py fi + # set .env echo "$line" >> "$ENV_FILE" + # set environment mkdir -p /etc echo "$line" >> /etc/environment + # Export to entrypoint if [ -f /entrypoint.sh ]; then sed -i "1a export $line" /entrypoint.sh 2> /dev/null; fi if [ -f /*/entrypoint.sh ]; then sed -i "1a export $line" /*/entrypoint.sh 2> /dev/null; fi + # Export to scripts if cat /etc/services.d/*/*run* &> /dev/null; then sed -i "1a export $line" /etc/services.d/*/*run* 2> /dev/null; fi if cat /etc/cont-init.d/*run* &> /dev/null; then sed -i "1a export $line" /etc/cont-init.d/*run* 2> /dev/null; fi + # For s6 if [ -d /var/run/s6/container_environment ]; then printf "%s" "${VALUE}" > /var/run/s6/container_environment/"${KEYS}"; fi - echo "export $line" >> ~/.bashrc + + # Persist for interactive shells + append_unique_line "$HOME/.bashrc" "export $line" + append_unique_line "/etc/bash.bashrc" "export $line" + # Show in log if ! bashio::config.false "verbose"; then bashio::log.blue "$line"; fi else From 0fdff170378c37ef1ac6251bf720561d5a4c3907 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 10 Jan 2026 18:35:01 +0100 Subject: [PATCH 21/26] Inject block into global bash configuration files Inject block into /etc/bash.bashrc and $HOME/bash.bashrc. --- .templates/00-global_var.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.templates/00-global_var.sh b/.templates/00-global_var.sh index a739884e9..c2b2f9221 100755 --- a/.templates/00-global_var.sh +++ b/.templates/00-global_var.sh @@ -300,6 +300,13 @@ done update_scripts_with_block +# --- MINIMAL CHANGE: also inject into /etc/bash.bashrc (for interactive bash shells) +mkdir -p /etc "$HOME" +touch "/etc/bash.bashrc" +touch "$HOME/bash.bashrc" +inject_block_into_file "/etc/bash.bashrc" +inject_block_into_file "$HOME/bash.bashrc" + ################ # Set timezone # ################ From bf6799199b9bd9d9f1778bde7a23699769363b15 Mon Sep 17 00:00:00 2001 From: alexbelgium Date: Sat, 10 Jan 2026 18:47:18 +0100 Subject: [PATCH 22/26] Updater bot : birdnet-go updated to nightly-20260110 --- birdnet-go/CHANGELOG.md | 3 +++ birdnet-go/config.yaml | 2 +- birdnet-go/updater.json | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/birdnet-go/CHANGELOG.md b/birdnet-go/CHANGELOG.md index f4287d525..7c7ac74a0 100644 --- a/birdnet-go/CHANGELOG.md +++ b/birdnet-go/CHANGELOG.md @@ -1,3 +1,6 @@ + +## nightly-20260110 (2026-01-10) +- Update to latest version from tphakala/birdnet-go (changelog : https://github.com/tphakala/birdnet-go/releases) ## nightly-20251223-2 (27-12-2025) - Minor bugs fixed ## nightly-20251224 (24-12-2025) diff --git a/birdnet-go/config.yaml b/birdnet-go/config.yaml index 5192c50f1..745a96eda 100644 --- a/birdnet-go/config.yaml +++ b/birdnet-go/config.yaml @@ -118,4 +118,4 @@ slug: birdnet-go udev: true url: https://github.com/alexbelgium/hassio-addons/tree/master/birdnet-go usb: true -version: nightly-20251223-2 +version: "nightly-20260110" diff --git a/birdnet-go/updater.json b/birdnet-go/updater.json index e60e214aa..5728faddc 100644 --- a/birdnet-go/updater.json +++ b/birdnet-go/updater.json @@ -2,10 +2,10 @@ "github_beta": true, "github_fulltag": true, "github_tagfilter": "nightly", - "last_update": "23-12-2025", + "last_update": "2026-01-10", "repository": "alexbelgium/hassio-addons", "slug": "birdnet-go", "source": "github", "upstream_repo": "tphakala/birdnet-go", - "upstream_version": "nightly-20251223" + "upstream_version": "nightly-20260110" } From 27816142ad2ad34fde8549091286c9beeb288fb3 Mon Sep 17 00:00:00 2001 From: alexbelgium Date: Sat, 10 Jan 2026 18:48:39 +0100 Subject: [PATCH 23/26] Updater bot : filebrowser updated to 2.54.0 --- filebrowser/CHANGELOG.md | 3 +++ filebrowser/config.yaml | 2 +- filebrowser/updater.json | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/filebrowser/CHANGELOG.md b/filebrowser/CHANGELOG.md index e5edacf70..cab73b32a 100644 --- a/filebrowser/CHANGELOG.md +++ b/filebrowser/CHANGELOG.md @@ -1,4 +1,7 @@ +## 2.54.0 (2026-01-10) +- Update to latest version from filebrowser/filebrowser (changelog : https://github.com/filebrowser/filebrowser/releases) + ## 2.53.1 (08-01-2026) - Update to latest version from filebrowser/filebrowser (changelog : https://github.com/filebrowser/filebrowser/releases) diff --git a/filebrowser/config.yaml b/filebrowser/config.yaml index e2799ea0a..e49016efc 100644 --- a/filebrowser/config.yaml +++ b/filebrowser/config.yaml @@ -123,4 +123,4 @@ schema: slug: filebrowser udev: true url: https://github.com/alexbelgium/hassio-addons -version: "2.53.1" +version: "2.54.0" diff --git a/filebrowser/updater.json b/filebrowser/updater.json index 51929cd84..c9c9b8be1 100644 --- a/filebrowser/updater.json +++ b/filebrowser/updater.json @@ -1,10 +1,10 @@ { "github_beta": "true", - "last_update": "08-01-2026", + "last_update": "2026-01-10", "paused": false, "repository": "alexbelgium/hassio-addons", "slug": "filebrowser", "source": "github", "upstream_repo": "filebrowser/filebrowser", - "upstream_version": "2.53.1" + "upstream_version": "2.54.0" } From 85bbe6a6988ae3581f6a32da9c249efe24f90e4e Mon Sep 17 00:00:00 2001 From: alexbelgium Date: Sat, 10 Jan 2026 18:48:49 +0100 Subject: [PATCH 24/26] Updater bot : fireflyiii_data_importer updated to 2.0.3 --- fireflyiii_data_importer/CHANGELOG.md | 3 +++ fireflyiii_data_importer/Dockerfile | 2 +- fireflyiii_data_importer/config.yaml | 2 +- fireflyiii_data_importer/updater.json | 4 ++-- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/fireflyiii_data_importer/CHANGELOG.md b/fireflyiii_data_importer/CHANGELOG.md index ff1256783..cb7187997 100644 --- a/fireflyiii_data_importer/CHANGELOG.md +++ b/fireflyiii_data_importer/CHANGELOG.md @@ -1,4 +1,7 @@ +## 2.0.3 (2026-01-10) +- Update to latest version from firefly-iii/data-importer (changelog : https://github.com/firefly-iii/data-importer/releases) + ## 2.0.2 (10-01-2026) - Update to latest version from firefly-iii/data-importer (changelog : https://github.com/firefly-iii/data-importer/releases) diff --git a/fireflyiii_data_importer/Dockerfile b/fireflyiii_data_importer/Dockerfile index 9eefafacb..5e0eb2cf9 100644 --- a/fireflyiii_data_importer/Dockerfile +++ b/fireflyiii_data_importer/Dockerfile @@ -16,7 +16,7 @@ ARG BUILD_FROM ARG BUILD_VERSION -ARG BUILD_UPSTREAM="2.0.2" +ARG BUILD_UPSTREAM="2.0.3" FROM ${BUILD_FROM} ################## diff --git a/fireflyiii_data_importer/config.yaml b/fireflyiii_data_importer/config.yaml index 58c461659..0bf9b4c07 100644 --- a/fireflyiii_data_importer/config.yaml +++ b/fireflyiii_data_importer/config.yaml @@ -101,5 +101,5 @@ schema: slug: fireflyiii_data_importer udev: true url: https://github.com/alexbelgium/hassio-addons -version: "2.0.2" +version: "2.0.3" webui: "[PROTO:ssl]://[HOST]:[PORT:8080]" diff --git a/fireflyiii_data_importer/updater.json b/fireflyiii_data_importer/updater.json index a21b92083..566862cc7 100644 --- a/fireflyiii_data_importer/updater.json +++ b/fireflyiii_data_importer/updater.json @@ -1,9 +1,9 @@ { "github_exclude": "develop", - "last_update": "10-01-2026", + "last_update": "2026-01-10", "repository": "alexbelgium/hassio-addons", "slug": "fireflyiii_data_importer", "source": "github", "upstream_repo": "firefly-iii/data-importer", - "upstream_version": "2.0.2" + "upstream_version": "2.0.3" } From 8e8c0358df79bbd92ab1951644131662cbc05ce2 Mon Sep 17 00:00:00 2001 From: alexbelgium Date: Sat, 10 Jan 2026 18:49:29 +0100 Subject: [PATCH 25/26] Updater bot : jackett updated to 0.24.807 --- jackett/CHANGELOG.md | 3 +++ jackett/config.yaml | 2 +- jackett/updater.json | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/jackett/CHANGELOG.md b/jackett/CHANGELOG.md index 2dc9d8b0d..26aacde8d 100644 --- a/jackett/CHANGELOG.md +++ b/jackett/CHANGELOG.md @@ -1,4 +1,7 @@ +## 0.24.807 (2026-01-10) +- Update to latest version from linuxserver/docker-jackett (changelog : https://github.com/linuxserver/docker-jackett/releases) + ## 0.24.790 (10-01-2026) - Update to latest version from linuxserver/docker-jackett (changelog : https://github.com/linuxserver/docker-jackett/releases) diff --git a/jackett/config.yaml b/jackett/config.yaml index 9261ae82d..075dc7c7c 100644 --- a/jackett/config.yaml +++ b/jackett/config.yaml @@ -106,5 +106,5 @@ schema: slug: jackett_nas udev: true url: https://github.com/alexbelgium/hassio-addons/tree/master/jackett -version: "0.24.790" +version: "0.24.807" webui: http://[HOST]:[PORT:9117] diff --git a/jackett/updater.json b/jackett/updater.json index e01ff6200..21554234f 100644 --- a/jackett/updater.json +++ b/jackett/updater.json @@ -1,8 +1,8 @@ { - "last_update": "10-01-2026", + "last_update": "2026-01-10", "repository": "alexbelgium/hassio-addons", "slug": "jackett", "source": "github", "upstream_repo": "linuxserver/docker-jackett", - "upstream_version": "0.24.790" + "upstream_version": "0.24.807" } From 7533143b279af5ba38c7bd636a9ac8e1761fcde4 Mon Sep 17 00:00:00 2001 From: alexbelgium Date: Sat, 10 Jan 2026 18:52:38 +0100 Subject: [PATCH 26/26] Updater bot : zzz_archived_code-server updated to 4.107.1 --- zzz_archived_code-server/CHANGELOG.md | 3 +++ zzz_archived_code-server/config.yaml | 2 +- zzz_archived_code-server/updater.json | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/zzz_archived_code-server/CHANGELOG.md b/zzz_archived_code-server/CHANGELOG.md index 36fa6fe6a..d4b4a469f 100644 --- a/zzz_archived_code-server/CHANGELOG.md +++ b/zzz_archived_code-server/CHANGELOG.md @@ -1,4 +1,7 @@ +## 4.107.1 (2026-01-10) +- Update to latest version from linuxserver/docker-code-server (changelog : https://github.com/linuxserver/docker-code-server/releases) + ## 4.107.0 (20-12-2025) - Update to latest version from linuxserver/docker-code-server (changelog : https://github.com/linuxserver/docker-code-server/releases) diff --git a/zzz_archived_code-server/config.yaml b/zzz_archived_code-server/config.yaml index 9eddac5d2..8c97964a6 100644 --- a/zzz_archived_code-server/config.yaml +++ b/zzz_archived_code-server/config.yaml @@ -101,5 +101,5 @@ schema: slug: code-server udev: true url: https://github.com/alexbelgium/hassio-addons/tree/master/coder-server -version: "4.107.0" +version: "4.107.1" webui: "[PROTO:ssl]://[HOST]:[PORT:8443]" diff --git a/zzz_archived_code-server/updater.json b/zzz_archived_code-server/updater.json index 8cbddd9dd..e5d3b2934 100644 --- a/zzz_archived_code-server/updater.json +++ b/zzz_archived_code-server/updater.json @@ -1,8 +1,8 @@ { - "last_update": "20-12-2025", + "last_update": "2026-01-10", "repository": "alexbelgium/hassio-addons", "slug": "code-server", "source": "github", "upstream_repo": "linuxserver/docker-code-server", - "upstream_version": "4.107.0" + "upstream_version": "4.107.1" }