Skip to content

Commit 9e69ad4

Browse files
authored
Exchange chown lines for Find (#524)
Change chown lines to fix delayed startup due to long running chown (issue #524)
1 parent 937a473 commit 9e69ad4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

rootfs/etc/cont-init.d/03-config.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ if [ -d "${LIBRENMS_PATH}/html/plugins/Weathermap" ]; then
105105
ln -sf /data/weathermap ${LIBRENMS_PATH}/html/plugins/Weathermap/configs
106106
fi
107107
chown -h librenms:librenms ${LIBRENMS_PATH}/html/plugins/Weathermap/configs
108-
chown -R librenms:librenms /data/weathermap ${LIBRENMS_PATH}/html/plugins/Weathermap/output
108+
find /data/weathermap ${LIBRENMS_PATH}/html/plugins/Weathermap/output -not \( -user librenms -group librenms \) -print0 | xargs -0 -r chown librenms:librenms
109109
fi
110110

111111
# cleanup bad symlink: https://github.com/librenms/docker/issues/294#issuecomment-1190389960
@@ -219,7 +219,7 @@ done
219219
# Fix perms
220220
echo "Fixing perms..."
221221
chown librenms:librenms /data/config /data/monitoring-plugins /data/plugins /data/rrd /data/weathermap /data/alert-templates
222-
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
222+
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
223223
chmod ug+rw /data/logs /data/rrd ${LIBRENMS_PATH}/bootstrap/cache ${LIBRENMS_PATH}/storage ${LIBRENMS_PATH}/storage/framework/*
224224

225225
# Check additional Monitoring plugins

0 commit comments

Comments
 (0)