8
# Reserve option to override port setting with:
9
# rpm -ba|--rebuild --define 'nsport 5666'
10
%{?port:%define nsport %{port}}
12
# Macro that print mesages to syslog at package (un)install time
13
%define nnmmsg logger -t %{name}/rpm
15
Summary: Host/service/network monitoring agent for Nagios
16
URL: http://www.nagios.org
21
Group: Application/System
22
Source0: %{name}-%{version}.tar.gz
23
BuildRoot: %{_tmppath}/%{name}-buildroot
27
Requires: bash, grep, nagios-plugins
28
PreReq: /usr/bin/logger, chkconfig, sh-utils, shadow-utils, sed, initscripts, fileutils, mktemp
31
Nrpe is a system daemon that will execute various Nagios plugins
32
locally on behalf of a remote (monitoring) host that uses the
33
check_nrpe plugin. Various plugins that can be executed by the
34
daemon are available at:
35
http://sourceforge.net/projects/nagiosplug
37
This package provides the core agent.
40
Group: Application/System
41
Summary: Provides nrpe plugin for Nagios.
42
Requires: nagios-plugins
45
Nrpe is a system daemon that will execute various Nagios plugins
46
locally on behalf of a remote (monitoring) host that uses the
47
check_nrpe plugin. Various plugins that can be executed by the
48
daemon are available at:
49
http://sourceforge.net/projects/nagiosplug
51
This package provides the nrpe plugin for Nagios-related applications.
58
# Create `nagios' user on the system if necessary
60
: # user already exists
62
/usr/sbin/useradd -r -d /var/log/nagios -s /bin/sh -c "%{nsusr}" -g %{nsgrp} %{nsusr} || \
63
%nnmmsg Unexpected error adding user "%{nsusr}". Aborting install process.
66
# if LSB standard /etc/init.d does not exist,
67
# create it as a symlink to the first match we find
68
if [ -d /etc/init.d -o -L /etc/init.d ]; then
70
elif [ -d /etc/rc.d/init.d ]; then
71
ln -s /etc/rc.d/init.d /etc/init.d
72
elif [ -d /usr/local/etc/rc.d ]; then
73
ln -s /usr/local/etc/rc.d /etc/init.d
74
elif [ -d /sbin/init.d ]; then
75
ln -s /sbin/init.d /etc/init.d
81
/sbin/service nrpe stop > /dev/null 2>&1
82
/sbin/chkconfig --del nrpe
86
if [ "$1" -ge "1" ]; then
87
/sbin/service nrpe condrestart >/dev/null 2>&1 || :
91
export PATH=$PATH:/usr/sbin
92
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" \
94
--with-init-dir=/etc/init.d \
95
--with-nrpe-port=%{nsport} \
96
--with-nrpe-user=%{nsusr} \
97
--with-nrpe-grp=%{nsgrp} \
99
--exec-prefix=%{_prefix}/sbin \
100
--bindir=%{_prefix}/sbin \
101
--sbindir=%{_prefix}/lib/nagios/cgi \
102
--libexecdir=%{_prefix}/lib/nagios/plugins \
103
--datadir=%{_prefix}/share/nagios \
104
--sysconfdir=/etc/nagios \
105
--localstatedir=/var/log/nagios
110
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
111
install -d -m 0755 ${RPM_BUILD_ROOT}/etc/init.d
112
install -d -m 0755 ${RPM_BUILD_ROOT}/etc/nagios
113
install -d -m 0755 ${RPM_BUILD_ROOT}/usr/sbin
114
install -d -m 0755 ${RPM_BUILD_ROOT}/usr/lib/nagios/plugins
116
# install templated configuration files
117
cp nrpe.cfg ${RPM_BUILD_ROOT}/etc/nagios/nrpe.cfg
118
cp init-script ${RPM_BUILD_ROOT}/etc/init.d/nrpe
119
cp src/nrpe ${RPM_BUILD_ROOT}/usr/sbin
120
cp src/check_nrpe ${RPM_BUILD_ROOT}/usr/lib/nagios/plugins
123
rm -rf $RPM_BUILD_ROOT
127
%defattr(755,root,root)
131
%defattr(644,root,root)
132
%config(noreplace) /etc/nagios/*.cfg
133
%defattr(755,%{nsusr},%{nsgrp})
134
%doc Changelog LEGAL README
137
%defattr(755,root,root)
138
%{_prefix}/lib/nagios/plugins
139
%defattr(755,%{nsusr},%{nsgrp})
140
%doc Changelog LEGAL README
143
* Tue Jan 07 2003 James 'Showkilr' Peterson <showkilr@showkilr.com>
144
- Removed the lines which removed the nagios user and group from the system
145
- changed the patch release version from 3 to 1
147
* Mon Jan 06 2003 James 'Showkilr' Peterson <showkilr@showkilr.com>
148
- Removed patch files required for nrpe 1.5
149
- Update spec file for version 1.6 (1.6-1)
151
* Sat Dec 28 2002 James 'Showkilr' Peterson <showkilr@showkilr.com>
152
- First RPM build (1.5-1)