Compare commits

..

1 Commits

Author SHA1 Message Date
Claude
f00c8b9210 fix(global_var): non-destructive .env writes; correct shell quoting
Three minimum-scope robustness fixes in .templates/00-global_var.sh:

1. shell_quote no longer doubles backslashes inside single quotes
   (e.g. 'C:\Users\test' was producing 'C:\\Users\\test' in injected
   scripts) and now uses the canonical '\'' escape for single quotes
   instead of the buggy '"'"' + trailing-space-trim form, which was
   mangling values containing apostrophes (e.g. "it's" -> "it' s").

2. /.env and /etc/environment are now patched in place: existing
   content from the upstream image and the system (PATH, LANG, etc.)
   is preserved and only the marked ADDON ENV block is replaced.
   Previously the whole files were overwritten, destroying upstream
   defaults.

3. Writing to /var/run/s6/container_environment is now best-effort
   (|| true) so a read-only mount on a single entry cannot abort the
   rest of the env injection under set -e.
2026-05-18 13:32:17 +00:00
47 changed files with 67 additions and 139 deletions

View File

@@ -82,11 +82,10 @@ dotenv_quote() {
}
shell_quote() {
# Single-quote for safe injection in shell code
local s="$1"
s="${s//\\/\\\\}"
s="${s//\'/\'\"\'\"\' }"
s="${s% }"
# Single-quote for safe injection in shell code.
# Inside single quotes only the single quote needs escaping ('->'\'').
# Do NOT escape backslashes: they are literal inside single quotes.
local s="${1//\'/\'\\\'\'}"
printf "'%s'" "$s"
}
@@ -166,9 +165,9 @@ export_var() {
# Runtime environment (no eval, safe for special chars)
export "$k=$v"
# S6 environment (preferred for services)
# S6 environment (preferred for services); best-effort, tolerate RO mounts
if [[ -d /var/run/s6/container_environment ]]; then
printf '%s' "$v" > "/var/run/s6/container_environment/$k"
printf '%s' "$v" > "/var/run/s6/container_environment/$k" || true
fi
# Queue for .env and /etc/environment (written once, idempotent)
@@ -219,18 +218,31 @@ done < <(
)
################################################################################
# Write .env and /etc/environment (idempotent: replace whole file content)
# Write .env and /etc/environment (idempotent: replace only our block,
# preserving any pre-existing content from the upstream image / system).
# Notes:
# - /.env is commonly used by apps expecting dotenv format
# - /etc/environment is read by PAM/system tooling; KEY="value" is acceptable
################################################################################
{
echo "$BLOCK_BEGIN"
cat "$KV_FILE"
echo "$BLOCK_END"
} > "$ENV_FILE.tmp"
mv "$ENV_FILE.tmp" "$ENV_FILE"
cp "$ENV_FILE" "$ETC_ENV_FILE"
update_env_file() {
local f="$1" tmp
tmp="$(mktemp_safe)"
if [[ -f "$f" ]]; then
awk -v b="$BLOCK_BEGIN" -v e="$BLOCK_END" '
$0==b { skip=1; next }
$0==e { skip=0; next }
!skip
' "$f" > "$tmp"
fi
{
echo "$BLOCK_BEGIN"
cat "$KV_FILE"
echo "$BLOCK_END"
} >> "$tmp"
mv "$tmp" "$f"
}
update_env_file "$ENV_FILE"
update_env_file "$ETC_ENV_FILE"
################################################################################
# Inject into scripts and shells (best-effort)

View File

@@ -1,7 +1,4 @@
## 1.79.0 (2026-05-19)
- Update to latest version from autobrr/autobrr (changelog : https://github.com/autobrr/autobrr/releases)
## 1.78.0 (2026-05-16)
- Update to latest version from autobrr/autobrr (changelog : https://github.com/autobrr/autobrr/releases)

View File

@@ -16,7 +16,7 @@
ARG BUILD_FROM
ARG BUILD_VERSION
ARG BUILD_UPSTREAM="1.79.0"
ARG BUILD_UPSTREAM="1.78.0"
FROM ${BUILD_FROM}
##################

View File

@@ -108,4 +108,4 @@ schema:
slug: autobrr
udev: true
url: https://github.com/alexbelgium/hassio-addons/tree/master/autobrr
version: "1.79.0"
version: "1.78.0"

View File

@@ -1,8 +1,8 @@
{
"last_update": "2026-05-19",
"last_update": "2026-05-16",
"repository": "alexbelgium/hassio-addons",
"slug": "autborr",
"source": "github",
"upstream_repo": "autobrr/autobrr",
"upstream_version": "1.79.0"
"upstream_version": "1.78.0"
}

View File

@@ -1,10 +1,4 @@
## 0.7.0-1 (2026-05-19)
- Serve the API via gunicorn + a gevent-websocket worker instead of the Werkzeug development server
## 0.7.0 (2026-05-19)
- Update to latest version from Suncuss/BirdNET-PiPy (changelog : https://github.com/Suncuss/BirdNET-PiPy/releases)
## 0.6.10 (2026-05-16)
- Update to latest version from Suncuss/BirdNET-PiPy (changelog : https://github.com/Suncuss/BirdNET-PiPy/releases)

View File

@@ -96,4 +96,4 @@ schema:
ssl: bool?
slug: birdnet-pipy
url: https://github.com/alexbelgium/hassio-addons/tree/master/birdnet-pipy
version: "0.7.0-1"
version: "0.6.10"

View File

@@ -4,16 +4,4 @@ set -euo pipefail
export PYTHONPATH=/app
bashio::net.wait_for 5001 127.0.0.1 300
cd /app
# Single gevent-websocket worker is mandatory: live detections fan out via an
# in-process socketio.emit (no Redis message_queue), so >1 worker would
# silently drop Live Feed broadcasts. Bind 127.0.0.1 (single container; nginx
# and core.main reach the API locally, satisfying the wait_for in nginx/run +
# main/run). Heavy admin jobs cooperatively yield to keep this worker live.
exec gunicorn wsgi:application \
--worker-class geventwebsocket.gunicorn.workers.GeventWebSocketWorker \
--workers 1 \
--bind 127.0.0.1:5002 \
--timeout 120 \
--graceful-timeout 30 \
--keep-alive 65 \
--error-logfile -
exec python3 -m core.api

View File

@@ -2,7 +2,7 @@
# shellcheck shell=bash
set -euo pipefail
# Wait for the upstream API service (gunicorn / wsgi:application) to bind 127.0.0.1:5002
# Wait for the upstream API service (Python core.api) to bind 127.0.0.1:5002
# before starting nginx, so nginx never serves a 502 for the API/auth/socket
# paths during boot. A boot-time 502 can be cached by an upstream cache layer
# (HA's own PWA service worker, a Cloudflare edge worker, etc.), leaving the

View File

@@ -1,8 +1,8 @@
{
"last_update": "2026-05-19",
"last_update": "2026-05-16",
"repository": "alexbelgium/hassio-addons",
"slug": "birdnet-pipy",
"source": "github",
"upstream_repo": "Suncuss/BirdNET-PiPy",
"upstream_version": "0.7.0"
"upstream_version": "0.6.10"
}

View File

@@ -1,7 +1,4 @@
## 0.55.5 (2026-05-19)
- Update to latest version from linuxserver/docker-changedetection.io (changelog : https://github.com/linuxserver/docker-changedetection.io/releases)
## 0.55.3 (2026-05-02)
- Update to latest version from linuxserver/docker-changedetection.io (changelog : https://github.com/linuxserver/docker-changedetection.io/releases)

View File

@@ -34,4 +34,4 @@ schema:
slug: changedetection.io
udev: true
url: https://github.com/alexbelgium/hassio-addons/tree/master/changedetection.io
version: "0.55.5"
version: "0.55.3"

View File

@@ -1,9 +1,9 @@
{
"github_fulltag": "false",
"last_update": "2026-05-19",
"last_update": "2026-05-02",
"repository": "alexbelgium/hassio-addons",
"slug": "changedetection.io",
"source": "github",
"upstream_repo": "linuxserver/docker-changedetection.io",
"upstream_version": "0.55.5"
"upstream_version": "0.55.3"
}

View File

@@ -1,7 +1,4 @@
## 19.17.0 (2026-05-19)
- Update to latest version from coderaiser/cloudcmd (changelog : https://github.com/coderaiser/cloudcmd/releases)
## 19.16.0 (2026-05-09)
- Update to latest version from coderaiser/cloudcmd (changelog : https://github.com/coderaiser/cloudcmd/releases)

View File

@@ -104,4 +104,4 @@ schema:
slug: cloudcommander
udev: true
url: https://github.com/alexbelgium/hassio-addons/tree/master/cloudcommander
version: "19.17.0"
version: "19.16.0"

View File

@@ -1,8 +1,8 @@
{
"last_update": "2026-05-19",
"last_update": "2026-05-09",
"repository": "alexbelgium/hassio-addons",
"slug": "cloudcommander",
"source": "github",
"upstream_repo": "coderaiser/cloudcmd",
"upstream_version": "19.17.0"
"upstream_version": "19.16.0"
}

View File

@@ -1,7 +1,4 @@
## 4.9.5.0 (2026-05-19)
- Update to latest version from linuxserver/docker-emby (changelog : https://github.com/linuxserver/docker-emby/releases)
## 4.9.3.0 (2026-01-10)
- Update to latest version from linuxserver/docker-emby (changelog : https://github.com/linuxserver/docker-emby/releases)

View File

@@ -121,5 +121,5 @@ schema:
slug: emby
udev: true
url: https://github.com/alexbelgium/hassio-addons/tree/master/emby
version: "4.9.5.0"
version: "4.9.3.0"
video: true

View File

@@ -1,9 +1,9 @@
{
"github_beta": "false",
"last_update": "2026-05-19",
"last_update": "10-01-2026",
"repository": "alexbelgium/hassio-addons",
"slug": "emby",
"source": "github",
"upstream_repo": "linuxserver/docker-emby",
"upstream_version": "4.9.5.0"
"upstream_version": "4.9.3.0"
}

View File

@@ -1,7 +1,4 @@
## debian-2026-05-19 (2026-05-19)
- Update to latest version from charlocharlie/epicgames-freegames
## debian-2026-05-08 (2026-05-08)
- Update to latest version from charlocharlie/epicgames-freegames

View File

@@ -88,5 +88,5 @@ schema:
slug: epicgamesfree
udev: true
url: https://github.com/alexbelgium/hassio-addons
version: "debian-2026-05-19"
version: "debian-2026-05-08"
webui: "[PROTO:ssl]://[HOST]:[PORT:3000]"

View File

@@ -2,10 +2,10 @@
"dockerhub_by_date": true,
"dockerhub_list_size": 2,
"github_exclude": "-",
"last_update": "2026-05-19",
"last_update": "2026-05-08",
"repository": "alexbelgium/hassio-addons",
"slug": "epicgamesfree",
"source": "dockerhub",
"upstream_repo": "charlocharlie/epicgames-freegames",
"upstream_version": "debian-2026-05-19"
"upstream_version": "debian-2026-05-08"
}

View File

@@ -1,14 +1,3 @@
## 2.63.4-3 (2026-05-20)
- Fix: add nginx redirect from root `/` to `/files/` to prevent Vue Router crash on startup
- Vue Router 4's `/:catchAll(.*)*` redirect throws `TypeError: e.params.catchAll is not iterable` when `catchAll` is `undefined` (navigating to root `/`)
- The redirect ensures the app always loads at `/files/` so the broken catch-all redirect code is never invoked
## 2.63.4-1 (2026-05-20)
- Fix: always pass --noauth flag when NoAuth=true to ensure correct database initialization (prevents continuous loading screen / blue pulsating dots)
- Fix: avoid passing empty string arguments to filebrowser command
## 2.63.4 (2026-05-19)
- Update to latest version from filebrowser/filebrowser (changelog : https://github.com/filebrowser/filebrowser/releases)
## 2.63.3 (2026-05-09)
- Update to latest version from filebrowser/filebrowser (changelog : https://github.com/filebrowser/filebrowser/releases)

View File

@@ -77,7 +77,6 @@ environment:
homeassistant: 2025.5.0
image: ghcr.io/alexbelgium/filebrowser-{arch}
ingress: true
ingress_entry: files
ingress_port: 8071
ingress_stream: true
map:
@@ -124,4 +123,4 @@ schema:
slug: filebrowser
udev: true
url: https://github.com/alexbelgium/hassio-addons
version: "2.63.4-3"
version: "2.63.3"

View File

@@ -77,9 +77,9 @@ if bashio::config.true 'NoAuth'; then
rm /data/auth &> /dev/null || true
rm /config/filebrowser.dB &> /dev/null || true
touch /data/noauth
NOAUTH="--noauth"
bashio::log.warning "Auth method change, database reset"
fi
NOAUTH="--noauth"
bashio::log.info "NoAuth option selected"
else
if ! bashio::fs.file_exists "/data/auth"; then
@@ -113,7 +113,7 @@ fi
bashio::log.info "Starting..."
# shellcheck disable=SC2086
/./bin/filebrowser --disablePreviewResize --disableTypeDetectionByHeader --cacheDir="/cache" $CERTFILE $KEYFILE --root="$BASE_FOLDER" --address=0.0.0.0 --port=8080 --database=/config/filebrowser.dB ${NOAUTH:+$NOAUTH} ${DISABLE_THUMBNAILS:+$DISABLE_THUMBNAILS} &
/./bin/filebrowser --disablePreviewResize --disableTypeDetectionByHeader --cacheDir="/cache" $CERTFILE $KEYFILE --root="$BASE_FOLDER" --address=0.0.0.0 --port=8080 --database=/config/filebrowser.dB "$NOAUTH" "$DISABLE_THUMBNAILS" &
bashio::net.wait_for 8080 localhost 900 || true
bashio::log.info "Started !"
nginx || bashio::log.fatal "Nginx failed"

View File

@@ -6,12 +6,6 @@ server {
client_max_body_size 0;
# Redirect bare root to /files/ so the Vue Router never sees path "/"
# (Vue Router 4's /:catchAll(.*)* redirect crashes when catchAll is undefined)
location = / {
return 302 files/;
}
location / {
add_header Access-Control-Allow-Origin *;
proxy_connect_timeout 30m;

View File

@@ -1,10 +1,10 @@
{
"github_beta": "true",
"last_update": "2026-05-19",
"last_update": "2026-05-09",
"paused": false,
"repository": "alexbelgium/hassio-addons",
"slug": "filebrowser",
"source": "github",
"upstream_repo": "filebrowser/filebrowser",
"upstream_version": "2.63.4"
"upstream_version": "2.63.3"
}

View File

@@ -1,7 +1,4 @@
## 1.3.3 (2026-05-19)
- Update to latest version from gtsteffaniak/filebrowser (changelog : https://github.com/gtsteffaniak/filebrowser/releases)
## 1.3.2 (2026-05-16)
- Update to latest version from gtsteffaniak/filebrowser (changelog : https://github.com/gtsteffaniak/filebrowser/releases)

View File

@@ -110,4 +110,4 @@ schema:
slug: filebrowser_quantum
udev: true
url: https://github.com/alexbelgium/hassio-addons
version: "1.3.3"
version: "1.3.2"

View File

@@ -1,10 +1,10 @@
{
"github_beta": "false",
"last_update": "2026-05-19",
"last_update": "2026-05-16",
"paused": false,
"repository": "alexbelgium/hassio-addons",
"slug": "filebrowser_quantum",
"source": "github",
"upstream_repo": "gtsteffaniak/filebrowser",
"upstream_version": "1.3.3"
"upstream_version": "1.3.2"
}

View File

@@ -1,7 +1,3 @@
## 2.3.2-4 (18-05-2026)
- Minor bugs fixed
## 2.3.2-3 (18-05-2026)
- Minor bugs fixed
## 2.3.2-2 (18-05-2026)
- Minor bugs fixed

View File

@@ -101,5 +101,5 @@ schema:
slug: fireflyiii_data_importer
udev: true
url: https://github.com/alexbelgium/hassio-addons
version: "2.3.2-4"
version: "2.3.2-3"
webui: "[PROTO:ssl]://[HOST]:[PORT:8080]"

View File

@@ -29,7 +29,6 @@ export CAN_POST_AUTOIMPORT="$(bashio::config "CAN_POST_AUTOIMPORT")"
# Persist variables to /etc/environment for cron jobs
{
[ -n "$JSON_CONFIGURATION_DIR" ] && echo "JSON_CONFIGURATION_DIR=\"$JSON_CONFIGURATION_DIR\""
echo "CONFIG_LOCATION=\"$CONFIGSOURCE\""
echo "IMPORT_DIR_ALLOWLIST=\"$IMPORT_DIR_ALLOWLIST\""
echo "IMPORT_DIR_WHITELIST=\"$IMPORT_DIR_WHITELIST\""
echo "AUTO_IMPORT_SECRET=\"$AUTO_IMPORT_SECRET\""

View File

@@ -6,8 +6,7 @@ set -e
# shellcheck disable=SC1091
if [ -f /etc/environment ]; then set -a; . /etc/environment; set +a; fi
# Use persisted value instead of calling bashio::config (www-data may lack API access)
CONFIGSOURCE="${CONFIG_LOCATION}"
CONFIGSOURCE="$(bashio::config "CONFIG_LOCATION")"
(
bashio::log.info "Running update according to defined schedule. Files located in $CONFIGSOURCE/import_files will be imported. If /config, it is accessible in the folder /addon_configs/xxx-firefly_data_importer when using the Filebrowser addon"

View File

@@ -1,7 +1,4 @@
## 26.5.2 (2026-05-19)
- Update to latest version from gramps-project/gramps-web (changelog : https://github.com/gramps-project/gramps-web/releases)
## 26.5.1 (2026-05-16)
- Update to latest version from gramps-project/gramps-web (changelog : https://github.com/gramps-project/gramps-web/releases)

View File

@@ -115,5 +115,5 @@ services:
slug: grampsweb
tmpfs: true
url: https://github.com/alexbelgium/hassio-addons/tree/master/grampsweb
version: "26.5.2"
version: "26.5.1"
webui: "[PROTO:ssl]://[HOST]:[PORT:5001]"

View File

@@ -1,9 +1,9 @@
{
"github_beta": true,
"last_update": "2026-05-19",
"last_update": "2026-05-16",
"repository": "alexbelgium/hassio-addons",
"slug": "grampsweb",
"source": "github",
"upstream_repo": "gramps-project/gramps-web",
"upstream_version": "26.5.2"
"upstream_version": "26.5.1"
}

View File

@@ -1,10 +1,4 @@
## 2.7.5 (2026-05-19)
- Update to latest version from imagegenius/docker-immich (changelog : https://github.com/imagegenius/docker-immich/releases)
## 2026.0.0 (2026-05-19)
- Update to latest version from imagegenius/docker-immich (changelog : https://github.com/imagegenius/docker-immich/releases)
## 2.7.5 (2026-05-17)
- Switch upstream image tags from arch-specific (`arm64v8-latest`/`amd64-latest`) to `:latest`

View File

@@ -1,7 +1,6 @@
{
"github_beta": "false",
"github_exclude": "2026",
"last_update": "2026-05-19",
"last_update": "2026-04-18",
"repository": "alexbelgium/hassio-addons",
"slug": "immich",
"source": "github",

View File

@@ -1,10 +1,4 @@
## 2.7.5 (2026-05-19)
- Update to latest version from imagegenius/docker-immich (changelog : https://github.com/imagegenius/docker-immich/releases)
## 2026.0.0 (2026-05-19)
- Update to latest version from imagegenius/docker-immich (changelog : https://github.com/imagegenius/docker-immich/releases)
## 2.7.5 (2026-04-18)
- Update to latest version from imagegenius/docker-immich (changelog : https://github.com/imagegenius/docker-immich/releases)

View File

@@ -1,7 +1,6 @@
{
"github_beta": "false",
"github_exclude": "2026",
"last_update": "2026-05-19",
"last_update": "2026-04-18",
"repository": "alexbelgium/hassio-addons",
"slug": "immich",
"source": "github",

View File

@@ -1,7 +1,4 @@
## 2026.0.0 (2026-05-19)
- Update to latest version from imagegenius/docker-immich (changelog : https://github.com/imagegenius/docker-immich/releases)
## 2.7.5 (2026-04-18)
- Update to latest version from imagegenius/docker-immich (changelog : https://github.com/imagegenius/docker-immich/releases)

View File

@@ -142,6 +142,6 @@ slug: immich_noml
udev: true
url: https://github.com/alexbelgium/hassio-addons
usb: true
version: "2026.0.0"
version: "2.7.5"
video: true
webui: http://[HOST]:[PORT:8080]

View File

@@ -1,10 +1,9 @@
{
"github_beta": "false",
"github_exclude": "2026",
"last_update": "2026-05-19",
"last_update": "2026-04-18",
"repository": "alexbelgium/hassio-addons",
"slug": "immich",
"source": "github",
"upstream_repo": "imagegenius/docker-immich",
"upstream_version": "2026.0.0"
"upstream_version": "2.7.5"
}

View File

@@ -1,6 +1,5 @@
{
"github_beta": "false",
"github_exclude": "2026",
"last_update": "2026-04-18",
"repository": "alexbelgium/hassio-addons",
"slug": "immich",

View File

@@ -1,5 +1,3 @@
## 5.2.0-18 (19-05-2026)
- Minor bugs fixed
## 5.2.0-17 (13-05-2026)
- Remove lockfile due to upstream bug https://github.com/linuxserver/docker-qbittorrent/issues/434

View File

@@ -143,4 +143,4 @@ schema:
slug: qbittorrent
udev: true
url: https://github.com/alexbelgium/hassio-addons
version: "5.2.0-18"
version: "5.2.0-17"