Verisign stuff
This commit is contained in:
51
net-mgmt/nrpe/files/nrpe.in
Normal file
51
net-mgmt/nrpe/files/nrpe.in
Normal file
@ -0,0 +1,51 @@
|
||||
#!/bin/sh
|
||||
|
||||
# PROVIDE: nrpe
|
||||
# REQUIRE: LOGIN
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf to enable nrpe:
|
||||
# nrpe_enable (bool): Set to "NO" by default.
|
||||
# Set it to "YES" to enable nrpe.
|
||||
# nrpe_flags (str): Not set by default.
|
||||
# nrpe_configfile (str): Set to "%%PREFIX%%/etc/nrpe.cfg" by default.
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=nrpe
|
||||
rcvar=nrpe_enable
|
||||
|
||||
load_rc_config "${name}"
|
||||
|
||||
: ${nrpe_enable:=NO}
|
||||
: ${nrpe_configfile:=%%PREFIX%%/etc/nrpe.cfg}
|
||||
|
||||
required_files="${nrpe_configfile}"
|
||||
|
||||
command="%%PREFIX%%/sbin/nrpe"
|
||||
command_args="-c ${nrpe_configfile} -d"
|
||||
extra_commands=reload
|
||||
sig_reload=HUP
|
||||
|
||||
start_precmd=nrpe_prestart
|
||||
stop_precmd=find_pidfile
|
||||
|
||||
find_pidfile()
|
||||
{
|
||||
[ -n "$nrpe_pidfile" ] &&
|
||||
warn "No longer necessary to set nrpe_pidfile in rc.conf[.local]"
|
||||
|
||||
if get_pidfile_from_conf pid_file ${nrpe_configfile}; then
|
||||
pidfile="$_pidfile_from_conf"
|
||||
else
|
||||
pidfile='%%PIDDIR%%/nrpe.pid'
|
||||
fi
|
||||
}
|
||||
|
||||
nrpe_prestart()
|
||||
{
|
||||
find_pidfile
|
||||
install -d -o ${nrpe_user:-nagios} ${pidfile%/*}
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
||||
18
net-mgmt/nrpe/files/patch-include_common.h.in
Normal file
18
net-mgmt/nrpe/files/patch-include_common.h.in
Normal file
@ -0,0 +1,18 @@
|
||||
--- include/common.h.in.orig 2022-07-18 19:27:53 UTC
|
||||
+++ include/common.h.in
|
||||
@@ -34,10 +34,15 @@
|
||||
# define OPENSSL_NO_DEPRECATED
|
||||
#endif
|
||||
#include <@SSL_INC_PREFIX@@SSL_HDR@>
|
||||
+#include <@SSL_INC_PREFIX@crypto.h>
|
||||
# ifdef SSL_TYPE_openssl
|
||||
# include <@SSL_INC_PREFIX@err.h>
|
||||
# include <@SSL_INC_PREFIX@rand.h>
|
||||
# include <@SSL_INC_PREFIX@engine.h>
|
||||
+# include <@SSL_INC_PREFIX@crypto.h>
|
||||
+# if defined (LIBRESSL_VERSION_NUMBER)
|
||||
+# include <@SSL_INC_PREFIX@opensslfeatures.h>
|
||||
+# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
11
net-mgmt/nrpe/files/patch-src_check__nrpe.c
Normal file
11
net-mgmt/nrpe/files/patch-src_check__nrpe.c
Normal file
@ -0,0 +1,11 @@
|
||||
--- src/check_nrpe.c.orig 2022-07-18 19:27:53 UTC
|
||||
+++ src/check_nrpe.c
|
||||
@@ -899,7 +899,7 @@ void setup_ssl()
|
||||
exit(timeout_return_code);
|
||||
}
|
||||
|
||||
-#if OPENSSL_VERSION_NUMBER >= 0x10100000
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
|
||||
SSL_CTX_set_max_proto_version(ctx, 0);
|
||||
|
||||
11
net-mgmt/nrpe/files/patch-src_nrpe.c
Normal file
11
net-mgmt/nrpe/files/patch-src_nrpe.c
Normal file
@ -0,0 +1,11 @@
|
||||
--- src/nrpe.c.orig 2022-07-18 19:27:53 UTC
|
||||
+++ src/nrpe.c
|
||||
@@ -357,7 +357,7 @@ void init_ssl(void)
|
||||
exit(STATE_CRITICAL);
|
||||
}
|
||||
|
||||
-#if OPENSSL_VERSION_NUMBER >= 0x10100000
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
|
||||
SSL_CTX_set_max_proto_version(ctx, 0);
|
||||
|
||||
12
net-mgmt/nrpe/files/pkg-message.in
Normal file
12
net-mgmt/nrpe/files/pkg-message.in
Normal file
@ -0,0 +1,12 @@
|
||||
[
|
||||
{ type: install
|
||||
message: <<EOM
|
||||
Enable NRPE in /etc/rc.conf with the following line:
|
||||
|
||||
nrpe_enable="YES"
|
||||
|
||||
A sample configuration is available in %%PREFIX%%/etc/nrpe.cfg.sample.
|
||||
Copy to nrpe.cfg where required and edit to suit your needs.
|
||||
EOM
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user