From 3aaac1f1780be717171e1598c35b24373cfd33e3 Mon Sep 17 00:00:00 2001
From: Pierre
Date: Fri, 6 Mar 2026 09:31:32 +0100
Subject: [PATCH] Fix review feedback: use /config, scope chmod, gate chown
- Use DATA_DIR=/config (config:rw map) per maintainer request
- Scope chmod to /entrypoint.sh and cont-init.d instead of whole FS
- Gate chown -R behind .initialized marker to avoid slow restarts
---
maintainerr/Dockerfile | 3 ++-
maintainerr/config.yaml | 2 +-
maintainerr/rootfs/entrypoint.sh | 8 ++++++--
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/maintainerr/Dockerfile b/maintainerr/Dockerfile
index 26ccdb606..8e43f7451 100644
--- a/maintainerr/Dockerfile
+++ b/maintainerr/Dockerfile
@@ -63,7 +63,8 @@ COPY --from=ha_tools /out/ /
# Add rootfs
COPY rootfs/ /
-RUN find /. -type f \( -name "*.sh" \) -print -exec chmod +x {} \;
+RUN chmod +x /entrypoint.sh \
+ && find /etc/cont-init.d /etc/cont-finish.d -type f -name "*.sh" -exec chmod +x {} \; 2>/dev/null || true
# Install bashio standalone
RUN BASHIO_VERSION="0.14.3" && \
diff --git a/maintainerr/config.yaml b/maintainerr/config.yaml
index 2d7a8c31f..1b5ee9802 100644
--- a/maintainerr/config.yaml
+++ b/maintainerr/config.yaml
@@ -71,7 +71,7 @@ ingress_stream: true
init: false
panel_icon: mdi:movie-search
map:
- - addon_config:rw
+ - config:rw
name: Maintainerr
options:
env_vars: []
diff --git a/maintainerr/rootfs/entrypoint.sh b/maintainerr/rootfs/entrypoint.sh
index 17cfa1d19..ba0dbe693 100644
--- a/maintainerr/rootfs/entrypoint.sh
+++ b/maintainerr/rootfs/entrypoint.sh
@@ -26,10 +26,14 @@ fi
# ─── Setup persistent data directory ─────────────────────────────────────────
# /opt/data is a Docker VOLUME in the upstream image and cannot be removed.
# Maintainerr supports the DATA_DIR env var to redirect data storage.
-DATA_DIR="/addon_configs/maintainerr"
+DATA_DIR="/config"
echo "[Maintainerr] Setting up data directory: $DATA_DIR"
mkdir -p "$DATA_DIR"
-chown -R node:node "$DATA_DIR"
+# Only chown on first run to avoid slow startup on large directories
+if [ ! -f "$DATA_DIR/.initialized" ]; then
+ chown -R node:node "$DATA_DIR"
+ touch "$DATA_DIR/.initialized"
+fi
export DATA_DIR
# ─── Start Maintainerr as unprivileged node user ─────────────────────────────