Import check_mk_agent from ports

This commit is contained in:
2024-09-09 11:15:45 +02:00
parent cdfff2f06d
commit 53b60cbc27
5 changed files with 135 additions and 0 deletions

View File

@ -0,0 +1,26 @@
--- check_mk_agent.freebsd.orig 2024-08-15 18:32:18 UTC
+++ check_mk_agent.freebsd
@@ -117,9 +117,9 @@ set_variable_defaults() {
#
set_variable_defaults() {
- : "${MK_LIBDIR:=/usr/local/lib/check_mk_agent}"
- : "${MK_CONFDIR:=/etc/check_mk}"
- : "${MK_VARDIR:=/var/lib/check_mk_agent}"
+ : "${MK_LIBDIR:=%%CHECKMK_LIBDIR%%}"
+ : "${MK_CONFDIR:=%%CHECKMK_CONFDIR%%}"
+ : "${MK_VARDIR:=/var/db/check_mk_agent}"
: "${MK_LOGDIR:=/var/log/check_mk_agent}"
# some 'booleans'
@@ -138,8 +138,8 @@ preamble_1() {
# Make sure locally installed binaries are found
# Only add binaries if they are not already in the path! If you append to path in a loop the process will
# eventually each the 128k size limit for the environment and become a zombie process. See execve manpage.
- [ "${PATH#*"/usr/local/bin"}" != "${PATH}" ] || PATH="${PATH}:/usr/local/bin"
- [ "${PATH#*"/usr/local/sbin"}" != "${PATH}" ] || PATH="${PATH}:/usr/local/sbin"
+ [ "${PATH#*"%%LOCALBASE%%/bin"}" != "${PATH}" ] || PATH="${PATH}:%%LOCALBASE%%/bin"
+ [ "${PATH#*"%%LOCALBASE%%/sbin"}" != "${PATH}" ] || PATH="${PATH}:%%LOCALBASE%%/sbin"
[ -d "/var/qmail/bin" ] && { [ "${PATH#*"/var/qmail/bin"}" != "${PATH}" ] || PATH="${PATH}:/var/qmail/bin"; }
# All executables in PLUGINSDIR will simply be executed and their

View File

@ -0,0 +1,16 @@
[
{ type: install
message: <<EOM
Checkmk may collect additional data if the following ports are installed:
- sysutils/megacli
- mail/postfix
- mail/qmail
See the code of the agent (%%PREFIX%%/bin/%%PORTNAME%%) for details.
Configuration instructions may be found in one of the following places:
- %%DOCSDIR%%/README.FreeBSD
- https://docs.checkmk.com/latest/en/agent_freebsd.html
EOM
}
]