[Bug 260085] net-mgmt/librenms

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 28 Nov 2021 01:55:43 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260085

            Bug ID: 260085
           Summary: net-mgmt/librenms
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: dvl@FreeBSD.org
          Reporter: darren.henderson@gmail.com
          Assignee: dvl@FreeBSD.org
             Flags: maintainer-feedback?(dvl@FreeBSD.org)

service librenms start fails. /var/log/librenms/librenms-service.log showing

env: php: No such file or directory
MainThread(ERROR):ERROR: Could not load or parse configuration! /usr/bin/env
php /usr/local/www/librenms/config_to_json.php 2>&1: 
'NoneType' object has no attribute 'get'

The crux of the problem is that daemon starts with a very restricted path
(/sbin:/bin:/usr/sbin:/usr/bin) - this causes env to fail to find php when
/usr/local/www/librenms/snmp-scan.py attempts to grab the .env file.

I'm not sure what the "right" fix is for this, the two quickest work arounds
are to add a soft link from /usr/bin/php to /usr/local/bin/php or adjusting the
path in /usr/local/etc/rc.d/librenms to include /usr/local/bin. Neither of
which I'm crazy about.

-- 
You are receiving this mail because:
You are the assignee for the bug.