Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Apr 2021 21:26:28 GMT
From:      Dan Langille <dvl@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 76bc66df08d2 - main - Install a newsyslog config file to rotate Librenms logs.
Message-ID:  <202104282126.13SLQSsV012072@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dvl:

URL: https://cgit.FreeBSD.org/ports/commit/?id=76bc66df08d29254a5096c1b5865b39bced9c3ee

commit 76bc66df08d29254a5096c1b5865b39bced9c3ee
Author:     Dan Langille <dvl@FreeBSD.org>
AuthorDate: 2021-04-28 20:55:11 +0000
Commit:     Dan Langille <dvl@FreeBSD.org>
CommitDate: 2021-04-28 21:26:24 +0000

    Install a newsyslog config file to rotate Librenms logs.
    
    PR:             255427
    Reported by:    James French <james@french.id.au>
---
 net-mgmt/librenms/Makefile                    | 6 ++++++
 net-mgmt/librenms/files/newsyslog.conf.sample | 7 +++++++
 net-mgmt/librenms/files/pkg-message.in        | 7 +++++++
 3 files changed, 20 insertions(+)

diff --git a/net-mgmt/librenms/Makefile b/net-mgmt/librenms/Makefile
index 7cb6d8910d6b..9706fe5adbc4 100644
--- a/net-mgmt/librenms/Makefile
+++ b/net-mgmt/librenms/Makefile
@@ -2,6 +2,7 @@
 
 PORTNAME=	librenms
 PORTVERSION=	21.4.0
+PORTREVISION=	1
 PORTEPOCH=	1
 CATEGORIES=	net-mgmt
 MASTER_SITES=	LOCAL/dvl:vendor
@@ -194,4 +195,9 @@ post-install:
 	@${ECHO_CMD} "@dir(root,www,0775) ${WWWDIR}/${f}" >> ${TMPPLIST}
 .endfor
 
+	@${MKDIR} ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d
+	${INSTALL_DATA} ${FILESDIR}/newsyslog.conf.sample ${STAGEDIR}/${WWWDIR}/contrib/newsyslog.conf.sample
+	@${ECHO_CMD} "@dir etc/newsyslog.conf.d" >> ${TMPPLIST}
+	@${ECHO_CMD} "@sample ${WWWDIR}/contrib/newsyslog.conf.sample etc/newsyslog.conf.d/librenms.conf" >> ${TMPPLIST}
+
 .include <bsd.port.mk>
diff --git a/net-mgmt/librenms/files/newsyslog.conf.sample b/net-mgmt/librenms/files/newsyslog.conf.sample
new file mode 100644
index 000000000000..9420d72da579
--- /dev/null
+++ b/net-mgmt/librenms/files/newsyslog.conf.sample
@@ -0,0 +1,7 @@
+# configuration file for newsyslog for librenms
+#
+# see newsyslog.conf(5) for details
+#
+# logfilename                           [owner:group]    mode count size when  flags [/pid_file] [sig_num]
+/var/log/librenms/librenms.log	        www:www          644  7	    *    $D0   J     /var/run/librenms/librenms.pid
+/var/log/librenms/librenms-service.log	www:www	         644  7	    *    $D0   J     /var/run/librenms/librenms.pid
diff --git a/net-mgmt/librenms/files/pkg-message.in b/net-mgmt/librenms/files/pkg-message.in
index 0ebb82513216..b0944c13e761 100644
--- a/net-mgmt/librenms/files/pkg-message.in
+++ b/net-mgmt/librenms/files/pkg-message.in
@@ -11,6 +11,8 @@ with the following notes:
 NOTE: setting sql-mode="" is no longer required. You can remove
 it from /usr/local/etc/mysql/my.cnf
 
+However, 'lower_case_table_names=0' is required.
+
 HEADS UP
 
 Polling via cron job has been removed.. Please use the Dispatcher.
@@ -28,6 +30,11 @@ The service will log to /var/log/librems/librenms-service.log
 
 see also https://docs.librenms.org/Extensions/Dispatcher-Service/
 
+For log file rotation
+
+* sample file installed to %%WWWDIR%%/contrib/newsyslog.conf.sample
+* actual file installed, never overwriting, to %%PREFIX%%/etc/newsyslog.conf.d/librenms.conf
+
 When converting from PYPOLLER to the Dispatcher Service (PYSERVICE),
 these steps will help you get started:
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104282126.13SLQSsV012072>