diff --git a/rootfs/etc/cont-init.d/03-config.sh b/rootfs/etc/cont-init.d/03-config.sh index 67d2d97..be9b960 100644 --- a/rootfs/etc/cont-init.d/03-config.sh +++ b/rootfs/etc/cont-init.d/03-config.sh @@ -179,6 +179,13 @@ if [ ! -z "${RRDCACHED_HOST}" ]; then EOL fi +# Config : Dispatcher +cat > ${LIBRENMS_PATH}/config.d/dispatcher.php <> ${CRONTAB_PATH}/librenms + +if [ "$LIBRENMS_WEATHERMAP" = "true" ] && [ -n "$LIBRENMS_WEATHERMAP_SCHEDULE" ]; then echo "Creating LibreNMS Weathermap cron task with the following period fields: $LIBRENMS_WEATHERMAP_SCHEDULE" echo "${LIBRENMS_WEATHERMAP_SCHEDULE} php -f /opt/librenms/html/plugins/Weathermap/map-poller.php" >> ${CRONTAB_PATH}/librenms fi @@ -28,10 +32,10 @@ echo "Fixing crontabs permissions..." chmod -R 0644 ${CRONTAB_PATH} # Create service -mkdir -p /etc/services.d/weathermap -cat > /etc/services.d/weathermap/run < /etc/services.d/cron/run <