1
0
Fork 0
mirror of https://github.com/librenms/docker.git synced 2026-01-23 10:15:22 +00:00

Compare commits

..

6 commits

Author SHA1 Message Date
Tony Murray
f45cd5726f
Merge pull request #540 from Xazziri/master
Improve startup speeds in some situations by using find before chown
2026-01-22 13:43:35 -06:00
Tony Murray
c8216efc47
Merge pull request #541 from librenms/murrant-patch-1
Run dispatcher in the correct directory
2026-01-22 13:27:41 -06:00
Tony Murray
13776f56bc
remove extra space 2026-01-22 13:23:29 -06:00
Tony Murray
6120a5356f
remove xargs and clear ownership logic 2026-01-22 13:22:53 -06:00
Tony Murray
7cf198beb8
Run dispatcher in the correct directory 2026-01-22 12:49:55 -06:00
Xazziri
9e69ad4b34
Exchange chown lines for Find (#524)
Change chown lines to fix delayed startup due to long running chown (issue #524)
2026-01-16 16:09:20 +01:00
2 changed files with 4 additions and 3 deletions

View file

@ -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 \( ! -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
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 \( ! -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

View file

@ -121,6 +121,7 @@ cat >/etc/services.d/dispatcher/run <<EOL
#!/usr/bin/execlineb -P
with-contenv
s6-setuidgid ${PUID}:${PGID}
/opt/librenms/librenms-service.py ${DISPATCHER_ARGS}
cd /opt/librenms
./librenms-service.py ${DISPATCHER_ARGS}
EOL
chmod +x /etc/services.d/dispatcher/run