mirror of
https://github.com/librenms/docker.git
synced 2026-01-23 02:14:48 +00:00
Fix symlink and perms for weathermap plugin configs folder (#301)
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
dc731efce3
commit
0af72265d4
1 changed files with 15 additions and 1 deletions
|
|
@ -88,7 +88,21 @@ sed -i -e "s/RANDOMSTRINGGOESHERE/${LIBRENMS_SNMP_COMMUNITY}/" /etc/snmp/snmpd.c
|
|||
# Init files and folders
|
||||
echo "Initializing LibreNMS files / folders..."
|
||||
mkdir -p /data/config /data/logs /data/monitoring-plugins /data/plugins /data/rrd /data/weathermap /data/alert-templates
|
||||
ln -sf /data/weathermap ${LIBRENMS_PATH}/html/plugins/Weathermap/configs
|
||||
|
||||
if [ -d "${LIBRENMS_PATH}/html/plugins/Weathermap/configs" ] && [ ! -L "${LIBRENMS_PATH}/html/plugins/Weathermap/configs" ]; then
|
||||
rm -rf ${LIBRENMS_PATH}/html/plugins/Weathermap/configs
|
||||
fi
|
||||
if [ ! -L "${LIBRENMS_PATH}/html/plugins/Weathermap/configs" ]; 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
|
||||
|
||||
# cleanup bad symlink: https://github.com/librenms/docker/issues/294#issuecomment-1190389960
|
||||
if [ -L "/data/weathermap/weathermap" ]; then
|
||||
rm /data/weathermap/weathermap
|
||||
fi
|
||||
|
||||
touch /data/logs/librenms.log
|
||||
rm -rf ${LIBRENMS_PATH}/logs
|
||||
rm -f ${LIBRENMS_PATH}/config.d/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue