librenms-plugins / Weathermap

MIT License
64 stars 51 forks source link

Shebang missing in map-poller.php #86

Open JulianvP opened 1 year ago

JulianvP commented 1 year ago

For my installation of librenms (which was a pre-build vm-image) the map-poller.php needs the shebang #!/usr/bin/env php in order to be executed correctly by cron.

cjwbath commented 1 year ago

This is the same for my manual install. As an alternative they could adjust the cron entry to add the php executable (which is what I did as a manual workaround). Not sure which is considered better practice.

appleguy010 commented 1 year ago

Can confirm this is an issue. Documentation here calls for the following cron job */5 * * * * librenms /opt/librenms/html/plugins/Weathermap/map-poller.php >> /dev/null 2>&1 This cron job depends on the shebang that should be at the top of map-poller.php, but isn't. The documentation could be updated with a new cron job with the php command added at the front, but this would not be optimal because someone who simply clones the newest git (like me) would have their current installation break (which it did).

This issue started with this commit in this pull request.