3 Summary: Nagios remote plugin execution service/plugin
4 Summary(pl): Demon i wtyczka zdalnego wywo³ywania wtyczek Nagios
10 Source0: http://dl.sourceforge.net/nagios/nrpe-%{version}.tar.gz
11 # Source0-md5: 70ef9502a3b7e49fa520dbceabfa04d0
13 URL: http://www.nagios.org/
14 BuildRequires: autoconf
15 BuildRequires: automake
16 BuildRequires: rpmbuild(macros) >= 1.159
17 BuildRequires: openssl-tools
18 Requires(pre): /usr/bin/getgid
19 Requires(pre): /bin/id
20 Requires(pre): /usr/sbin/groupadd
21 Requires(pre): /usr/sbin/useradd
22 Requires(post,postun): /sbin/chkconfig
23 Requires: nagios-plugins
24 Provides: group(%{nsgrp})
25 Provides: user(%{nsusr})
27 Obsoletes: netsaint-nrpe
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 %define _sysconfdir /etc/nagios
31 %define _datadir %{_prefix}/share/%{name}
32 %define _plugindir %{_libdir}/nagios/plugins
33 %define _localstatedir %{_var}/log/nagios
37 Nagios nrpe allows you to remotely execute plugins on other hosts
38 and report the plugin output back to the monitoring host.
41 Nagios npre pozwala zdalnie uruchamiaæ wtyczki na innych hostach,
42 a wynik ich dzia³ania zwracaæ z powrotem do hosta monitoruj±cego.
45 Summary: check_nrpe plugin for Nagios
46 Summary(pl): Wtyczka check_nrpe dla Nagiosa
50 check_nrpe plugin for Nagios. This plugin allows running plugins on
51 remote machines using nrpe service.
53 %description plugin -l pl
54 Wtyczka check_nrpe dla Nagiosa. Pozwala na zdalne uruchamianie
55 wtyczek na innych komputerach za pomoc± demona nrpe.
58 %setup -q -n nrpe-%{version}
65 --with-init-dir=/etc/rc.d/init.d \
66 --with-nrpe-port=%{nsport} \
67 --with-nrpe-user=%{nsusr} \
68 --with-nrpe-grp=%{nsgrp} \
70 --exec-prefix=%{_sbindir} \
71 --bindir=%{_sbindir} \
72 --libexecdir=%{_plugindir} \
73 --datadir=%{_prefix}/share/nagios \
74 --sysconfdir=%{_sysconfdir} \
75 --localstatedir=%{_localstatedir}
80 rm -rf $RPM_BUILD_ROOT
81 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir},%{_libdir}/nagios/plugins,%{_sbindir}} \
82 $RPM_BUILD_ROOT%{_localstatedir}
84 install nrpe.cfg $RPM_BUILD_ROOT/etc/nagios/nrpe.cfg
85 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/nrpe
86 install src/nrpe $RPM_BUILD_ROOT%{_sbindir}
87 install src/check_nrpe $RPM_BUILD_ROOT%{_plugindir}
90 rm -rf $RPM_BUILD_ROOT
93 if [ -n "`getgid %{nsgrp}`" ]; then
94 if [ "`getgid %{nsgrp}`" != "72" ]; then
95 echo "Error: group %{nsgrp} doesn't have gid=72. Correct this before installing %{name}." 1>&2
99 if [ -n "`getgid netsaint`" -a "`getgid netsaint`" = "72" ]; then
100 /usr/sbin/groupmod -n %{nsgrp} netsaint
102 /usr/sbin/groupadd -g 72 -f %{nsgrp}
105 if [ -n "`id -u %{nsusr} 2>/dev/null`" ]; then
106 if [ "`id -u %{nsusr}`" != "72" ]; then
107 echo "Error: user %{nsusr} doesn't have uid=72. Correct this before installing %{name}." 1>&2
111 if [ -n "`id -u netsaint 2>/dev/null`" -a "`id -u netsaint`" = "72" ]; then
112 /usr/sbin/usermod -d /tmp -l %{nsusr} netsaint
114 /usr/sbin/useradd -u 72 -d %{_libdir}/%{nsusr} -s /bin/false -c "%{name} User" -g %{nsgrp} %{nsusr} 1>&2
119 /sbin/chkconfig --add nrpe
120 if [ -f /var/lock/subsys/nrpe ]; then
121 /etc/rc.d/init.d/nrpe restart 1>&2
125 if [ "$1" = "0" ] ; then
126 if [ -f /var/lock/subsys/nrpe ]; then
127 /etc/rc.d/init.d/nrpe stop 1>&2
129 /sbin/chkconfig --del nrpe
133 if [ "$1" = "0" ]; then
135 %groupremove %{nsgrp}
139 %defattr(644,root,root,755)
140 %doc Changelog LEGAL README* SECURITY
141 %attr(754,root,root) /etc/rc.d/init.d/nrpe
142 %attr(751,root,%{nsgrp}) %dir %{_sysconfdir}
143 %attr(644,root,%{nsgrp}) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/nrpe.cfg
144 %attr(755,root,root) %{_sbindir}/nrpe
145 %dir %{_libdir}/nagios
148 %defattr(644,root,root,755)
150 %attr(755,root,root) %{_plugindir}/*