ports/net-mgmt/librenms/files/patch-config.php.default
Dan Langille 467e569d02 net-mgmt/librenms: Update to 22.2.1
re: https://github.com/librenms/librenms/releases/tag/22.2.1

This port update skips over several releases.
See: https://github.com/librenms/librenms/releases

See UPDATING for details on storage directory which needs to
move to /var/db/librenms

LiberNMS wants to write to the %%WWWDIR%%/storage directory. To comply
with man 7 hier, this entry is now a symlink to /var/db/librenms/storage
Please adjust your filesystem accordingly.

The contrib directory has been removed from the upstream tarball. As such,
the port now installs the log rotation file to
/${PREFIX}/etc/newsyslog.conf.d/librenms.conf.sample

PR:		260085 261031
2022-02-18 15:21:02 +00:00

64 lines
2.3 KiB
Text

--- config.php.default.orig 2022-01-23 14:47:41 UTC
+++ config.php.default
@@ -2,10 +2,26 @@
## Have a look in misc/config_definitions.json for examples of settings you can set here. DO NOT EDIT misc/config_definitions.json!
+#
+# The FreeBSD package set the following items
+#
+$config['installed_from_package'] = true;
+
+$config['log_dir'] = '/var/log/librenms';
+$config['rrd_dir'] = '/var/db/librenms/rrd';
+
// This is the user LibreNMS will run as
-//Please ensure this user is created and has the correct permissions to your install
-#$config['user'] = 'librenms';
+// Please ensure this user is created and has the correct permissions to your install
+// The FreeBSD package sets this.
+// It's up to you to install a webserver, such as Apache or Nginx. By default, they
+// run as the www user.
+//
+$config['user'] = 'www';
+#
+# The FreeBSD package set the above items
+#
+
### This should *only* be set if you want to *force* a particular hostname/port
### It will prevent the web interface being usable form any other hostname
#$config['base_url'] = "/";
@@ -27,7 +43,8 @@
#$config['nets'][] = "192.168.0.0/16";
# Uncomment the next line to disable daily updates
-#$config['update'] = 0;
+# FreeBSD package uncommented this line for you.
+$config['update'] = 0;
# Number in days of how long to keep old rrd files. 0 disables this feature
#$config['rrd_purge'] = 0;
@@ -43,3 +60,22 @@
# Enable the in-built services support (Nagios plugins)
#$config['show_services'] = 1;
+
+# These paths are supplied by the FreeBSD port and correct those found in
+# the code.
+
+$config['snmpwalk'] = '%%LOCALBASE%%/bin/snmpwalk';
+$config['snmpget'] = '%%LOCALBASE%%/bin/snmpget';
+$config['snmpbulkwalk'] = '%%LOCALBASE%%/bin/snmpbulkwalk';
+$config['snmptranslate'] = '%%LOCALBASE%%/bin/snmptranslate';
+
+$config['ping'] = '/sbin/ping';
+$config['mtr'] = '%%LOCALBASE%%/bin/mtr';
+$config['nmap'] = '%%LOCALBASE%%/bin/nmap';
+
+$config['nagios_plugins'] = '%%LOCALBASE%%/libexec/nagios';
+$config['ipmitool'] = '%%LOCALBASE%%/bin/ipmitool';
+$config['virsh'] = '%%LOCALBASE%%/bin/virsh';
+$config['dot'] = '%%LOCALBASE%%/bin/dot';
+$config['sfdp'] = '%%LOCALBASE%%/bin/sfdp';
+$config['nfdump'] = '%%LOCALBASE%%/bin/nfdump';