From 9e69ad4b34d61d71babd78202cc79b524bcda40c Mon Sep 17 00:00:00 2001 From: Xazziri <96234911+Xazziri@users.noreply.github.com> Date: Fri, 16 Jan 2026 16:09:20 +0100 Subject: [PATCH 1/4] Exchange chown lines for Find (#524) Change chown lines to fix delayed startup due to long running chown (issue #524) --- rootfs/etc/cont-init.d/03-config.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rootfs/etc/cont-init.d/03-config.sh b/rootfs/etc/cont-init.d/03-config.sh index 8d29435..973b6b4 100644 --- a/rootfs/etc/cont-init.d/03-config.sh +++ b/rootfs/etc/cont-init.d/03-config.sh @@ -105,7 +105,7 @@ if [ -d "${LIBRENMS_PATH}/html/plugins/Weathermap" ]; then ln -sf /data/weathermap ${LIBRENMS_PATH}/html/plugins/Weathermap/configs fi chown -h librenms:librenms ${LIBRENMS_PATH}/html/plugins/Weathermap/configs - chown -R librenms:librenms /data/weathermap ${LIBRENMS_PATH}/html/plugins/Weathermap/output + find /data/weathermap ${LIBRENMS_PATH}/html/plugins/Weathermap/output -not \( -user librenms -group librenms \) -print0 | xargs -0 -r chown librenms:librenms fi # cleanup bad symlink: https://github.com/librenms/docker/issues/294#issuecomment-1190389960 @@ -219,7 +219,7 @@ done # Fix perms echo "Fixing perms..." chown librenms:librenms /data/config /data/monitoring-plugins /data/plugins /data/rrd /data/weathermap /data/alert-templates -chown -R librenms:librenms /data/logs ${LIBRENMS_PATH}/composer* ${LIBRENMS_PATH}/config.d ${LIBRENMS_PATH}/bootstrap ${LIBRENMS_PATH}/logs ${LIBRENMS_PATH}/storage ${LIBRENMS_PATH}/vendor +find /data/logs ${LIBRENMS_PATH}/composer* ${LIBRENMS_PATH}/config.d ${LIBRENMS_PATH}/bootstrap ${LIBRENMS_PATH}/logs ${LIBRENMS_PATH}/storage ${LIBRENMS_PATH}/vendor -not \( -user librenms -group librenms \) -print0 | xargs -0 -r chown librenms:librenms chmod ug+rw /data/logs /data/rrd ${LIBRENMS_PATH}/bootstrap/cache ${LIBRENMS_PATH}/storage ${LIBRENMS_PATH}/storage/framework/* # Check additional Monitoring plugins From 7cf198beb83669ace4f74cd6659b76b4ddd815a2 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Thu, 22 Jan 2026 12:49:55 -0600 Subject: [PATCH 2/4] Run dispatcher in the correct directory --- rootfs/etc/cont-init.d/05-svc-dispatcher.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rootfs/etc/cont-init.d/05-svc-dispatcher.sh b/rootfs/etc/cont-init.d/05-svc-dispatcher.sh index 7bab042..157ff56 100644 --- a/rootfs/etc/cont-init.d/05-svc-dispatcher.sh +++ b/rootfs/etc/cont-init.d/05-svc-dispatcher.sh @@ -121,6 +121,7 @@ cat >/etc/services.d/dispatcher/run < Date: Thu, 22 Jan 2026 13:22:53 -0600 Subject: [PATCH 3/4] remove xargs and clear ownership logic --- rootfs/etc/cont-init.d/03-config.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rootfs/etc/cont-init.d/03-config.sh b/rootfs/etc/cont-init.d/03-config.sh index 973b6b4..f7ab725 100644 --- a/rootfs/etc/cont-init.d/03-config.sh +++ b/rootfs/etc/cont-init.d/03-config.sh @@ -105,7 +105,7 @@ if [ -d "${LIBRENMS_PATH}/html/plugins/Weathermap" ]; then ln -sf /data/weathermap ${LIBRENMS_PATH}/html/plugins/Weathermap/configs fi chown -h librenms:librenms ${LIBRENMS_PATH}/html/plugins/Weathermap/configs - find /data/weathermap ${LIBRENMS_PATH}/html/plugins/Weathermap/output -not \( -user librenms -group librenms \) -print0 | xargs -0 -r chown librenms:librenms + find /data/weathermap ${LIBRENMS_PATH}/html/plugins/Weathermap/output \( ! -user librenms -o ! -group librenms \) -exec chown librenms:librenms {} + fi # cleanup bad symlink: https://github.com/librenms/docker/issues/294#issuecomment-1190389960 @@ -219,7 +219,7 @@ done # Fix perms echo "Fixing perms..." chown librenms:librenms /data/config /data/monitoring-plugins /data/plugins /data/rrd /data/weathermap /data/alert-templates -find /data/logs ${LIBRENMS_PATH}/composer* ${LIBRENMS_PATH}/config.d ${LIBRENMS_PATH}/bootstrap ${LIBRENMS_PATH}/logs ${LIBRENMS_PATH}/storage ${LIBRENMS_PATH}/vendor -not \( -user librenms -group librenms \) -print0 | xargs -0 -r chown librenms:librenms +find /data/logs ${LIBRENMS_PATH}/composer* ${LIBRENMS_PATH}/config.d ${LIBRENMS_PATH}/bootstrap ${LIBRENMS_PATH}/logs ${LIBRENMS_PATH}/storage ${LIBRENMS_PATH}/vendor \( ! -user librenms -o ! -group librenms \) -exec chown librenms:librenms {} + chmod ug+rw /data/logs /data/rrd ${LIBRENMS_PATH}/bootstrap/cache ${LIBRENMS_PATH}/storage ${LIBRENMS_PATH}/storage/framework/* # Check additional Monitoring plugins From 13776f56bc68575cc224057ddafcf425ecfd573d Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Thu, 22 Jan 2026 13:23:29 -0600 Subject: [PATCH 4/4] remove extra space --- rootfs/etc/cont-init.d/03-config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootfs/etc/cont-init.d/03-config.sh b/rootfs/etc/cont-init.d/03-config.sh index f7ab725..013c15c 100644 --- a/rootfs/etc/cont-init.d/03-config.sh +++ b/rootfs/etc/cont-init.d/03-config.sh @@ -219,7 +219,7 @@ done # Fix perms echo "Fixing perms..." chown librenms:librenms /data/config /data/monitoring-plugins /data/plugins /data/rrd /data/weathermap /data/alert-templates -find /data/logs ${LIBRENMS_PATH}/composer* ${LIBRENMS_PATH}/config.d ${LIBRENMS_PATH}/bootstrap ${LIBRENMS_PATH}/logs ${LIBRENMS_PATH}/storage ${LIBRENMS_PATH}/vendor \( ! -user librenms -o ! -group librenms \) -exec chown librenms:librenms {} + +find /data/logs ${LIBRENMS_PATH}/composer* ${LIBRENMS_PATH}/config.d ${LIBRENMS_PATH}/bootstrap ${LIBRENMS_PATH}/logs ${LIBRENMS_PATH}/storage ${LIBRENMS_PATH}/vendor \( ! -user librenms -o ! -group librenms \) -exec chown librenms:librenms {} + chmod ug+rw /data/logs /data/rrd ${LIBRENMS_PATH}/bootstrap/cache ${LIBRENMS_PATH}/storage ${LIBRENMS_PATH}/storage/framework/* # Check additional Monitoring plugins