mirror of
https://git.freebsd.org/ports.git
synced 2025-06-05 21:00:30 -04:00
Try not to break a nagios installation when installing/upgrading nrpe by not
using /var/spool/nagios. The nrpe.spec file puts localstatedir to their nagios spool directory, but localstatedir is not used outside of the configure script, so, no need to have it here. Sponsored by: Absolight
This commit is contained in:
parent
0ad7b58de5
commit
c4d08fdda0
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=369602
2 changed files with 5 additions and 17 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
PORTNAME= nrpe
|
||||
DISTVERSION= 2.15
|
||||
PORTREVISION= 4
|
||||
PORTREVISION= 5
|
||||
CATEGORIES= net-mgmt
|
||||
MASTER_SITES= SF/nagios/${PORTNAME}-2.x/${PORTNAME}-${PORTVERSION}
|
||||
|
||||
|
@ -35,27 +35,21 @@ SSL_CFLAGS= -I${OPENSSLINC}
|
|||
ARGS_CONFIGURE_ON= --enable-command-args
|
||||
ARGS_CONFIGURE_OFF= --disable-command-args
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
NAGIOSUSER?= nagios
|
||||
NAGIOSGROUP?= nagios
|
||||
NAGIOSDIR?= /var/spool/nagios
|
||||
USERS= ${NAGIOSUSER}
|
||||
GROUPS= ${NAGIOSGROUP}
|
||||
|
||||
NAGIOSUID= 181
|
||||
NAGIOSGID= ${NAGIOSUID}
|
||||
NRPE_PIDDIR?= /var/run/nrpe2
|
||||
|
||||
CONFIGURE_ARGS+=--bindir=${PREFIX}/sbin \
|
||||
--libexecdir=${PREFIX}/libexec/nagios \
|
||||
--sysconfdir=${PREFIX}/etc \
|
||||
--localstatedir=${NAGIOSDIR} \
|
||||
--with-nrpe-user=${NAGIOSUSER} \
|
||||
--with-nrpe-group=${NAGIOSGROUP}
|
||||
|
||||
PLIST_SUB= NAGIOSDIR=${NAGIOSDIR} \
|
||||
NAGIOSUID=${NAGIOSUID} \
|
||||
PLIST_SUB= NAGIOSUSER=${NAGIOSUSER} \
|
||||
NAGIOSGROUP=${NAGIOSGROUP} \
|
||||
NRPE_PIDDIR=${NRPE_PIDDIR}
|
||||
SUB_LIST+= PIDDIR=${NRPE_PIDDIR}
|
||||
|
||||
|
@ -68,7 +62,6 @@ post-patch:
|
|||
${WRKSRC}/sample-config/nrpe.cfg.in
|
||||
do-install:
|
||||
${INSTALL} -d ${STAGEDIR}${NRPE_PIDDIR}
|
||||
${INSTALL} -m 750 -d ${STAGEDIR}${NAGIOSDIR}
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/src/nrpe ${STAGEDIR}${PREFIX}/sbin/nrpe2
|
||||
${MKDIR} ${STAGEDIR}${PREFIX}/libexec/nagios
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/src/check_nrpe ${STAGEDIR}${PREFIX}/libexec/nagios/check_nrpe2
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
@unexec cmp -s %D/etc/nrpe.cfg.sample %D/etc/nrpe.cfg && rm %D/etc/nrpe.cfg || true
|
||||
etc/nrpe.cfg.sample
|
||||
@exec test -f %B/nrpe.cfg || install -m 644 %D/%F %B/nrpe.cfg
|
||||
@sample etc/nrpe.cfg.sample
|
||||
libexec/nagios/check_nrpe2
|
||||
sbin/nrpe2
|
||||
@dirrmtry libexec/nagios
|
||||
@exec install -m 755 -o %%NAGIOSUID%% -d %%NRPE_PIDDIR%%
|
||||
@dirrmtry %%NAGIOSDIR%%
|
||||
@dirrmtry %%NRPE_PIDDIR%%
|
||||
@dir(%%NAGIOSUSER%%,%%NAGIOSGROUP%%,755) %%NRPE_PIDDIR%%
|
||||
|
|
Loading…
Add table
Reference in a new issue