The current code worked under the assumption that the Weathermap plugin is
installed in the '/html/plugins/Weathermap' directory which
is fine. This code breaks if the plugin were to be installed in a separate
directory somewhere else and then symlinked into the above mentioned place.
This patch introduces a "search" for libreNMS config.php file to determine
libreNMS' installation directory to calculate the correct paths. The config
file is searched in the following places in the following order:
The current code worked under the assumption that the Weathermap plugin is installed in the '/html/plugins/Weathermap' directory which
is fine. This code breaks if the plugin were to be installed in a separate
directory somewhere else and then symlinked into the above mentioned place.
This patch introduces a "search" for libreNMS config.php file to determine libreNMS' installation directory to calculate the correct paths. The config file is searched in the following places in the following order:
/etc/librenms/config.php will be used in some (hopefully sonn) upcoming libreNMS packages for some Distribution(s).
Signed-off-by: Maximilian Wilhelm max@rfc2324.org