0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-06 14:35:32 +00:00

fix: 🐛 docker bind-mount stock files creation ()

This commit is contained in:
Leny 2023-08-01 23:16:08 +02:00 committed by GitHub
parent 5bbcd96d4b
commit 7773b5ee33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,9 +46,10 @@ if [ -n "${PGID}" ]; then
usermod -a -G "${PGID}" "${DOCKER_USR}" || echo >&2 "Could not add netdata user to group docker with ID ${PGID}"
fi
if mountpoint -q /etc/netdata && [ -z "$(ls -A /etc/netdata)" ]; then
if mountpoint -q /etc/netdata; then
echo "Copying stock configuration to /etc/netdata"
cp -a /etc/netdata.stock/. /etc/netdata
cp -an /etc/netdata.stock/* /etc/netdata
cp -an /etc/netdata.stock/.[^.]* /etc/netdata
fi
if [ -w "/etc/netdata" ]; then