1
0
Fork 0
mirror of https://github.com/librenms/docker.git synced 2026-01-23 02:14:48 +00:00

Exchange chown lines for Find (#524)

Change chown lines to fix delayed startup due to long running chown (issue #524)
This commit is contained in:
Xazziri 2026-01-16 16:09:20 +01:00 committed by GitHub
parent 937a473821
commit 9e69ad4b34
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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 -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