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 Requires(pre): /usr/bin/getgid
18 Requires(pre): /bin/id
19 Requires(pre): /usr/sbin/groupadd
20 Requires(pre): /usr/sbin/useradd
21 Requires(post,postun): /sbin/chkconfig
22 Requires: nagios-plugins
23 Provides: group(%{nsgrp})
24 Provides: user(%{nsusr})
25 Obsoletes: netsaint-nrpe
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 %define _sysconfdir /etc/nagios
29 %define _datadir %{_prefix}/share/%{name}
30 %define _plugindir %{_libdir}/nagios/plugins
31 %define _localstatedir %{_var}/log/nagios
35 Nagios nrpe allows you to remotely execute plugins on other hosts
36 and report the plugin output back to the monitoring host.
39 Nagios npre pozwala zdalnie uruchamiaæ wtyczki na innych hostach,
40 a wynik ich dzia³ania zwracaæ z powrotem do hosta monitoruj±cego.
43 Summary: check_nrpe plugin for Nagios
44 Summary(pl): Wtyczka check_nrpe dla Nagiosa
48 check_nrpe plugin for Nagios. This plugin allows running plugins on
49 remote machines using nrpe service.
51 %description plugin -l pl
52 Wtyczka check_nrpe dla Nagiosa. Pozwala na zdalne uruchamianie
53 wtyczek na innych komputerach za pomoc± demona nrpe.
56 %setup -q -n nrpe-%{version}
63 --with-init-dir=/etc/rc.d/init.d \
64 --with-nrpe-port=%{nsport} \
65 --with-nrpe-user=%{nsusr} \
66 --with-nrpe-grp=%{nsgrp} \
68 --exec-prefix=%{_sbindir} \
69 --bindir=%{_sbindir} \
70 --libexecdir=%{_plugindir} \
71 --datadir=%{_prefix}/share/nagios \
72 --sysconfdir=%{_sysconfdir} \
73 --localstatedir=%{_localstatedir}
78 rm -rf $RPM_BUILD_ROOT
79 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir},%{_libdir}/nagios/plugins,%{_sbindir}} \
80 $RPM_BUILD_ROOT%{_localstatedir}
82 install nrpe.cfg $RPM_BUILD_ROOT/etc/nagios/nrpe.cfg
83 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/nrpe
84 install src/nrpe $RPM_BUILD_ROOT%{_sbindir}
85 install src/check_nrpe $RPM_BUILD_ROOT%{_plugindir}
88 rm -rf $RPM_BUILD_ROOT
91 if [ -n "`getgid %{nsgrp}`" ]; then
92 if [ "`getgid %{nsgrp}`" != "72" ]; then
93 echo "Error: group %{nsgrp} doesn't have gid=72. Correct this before installing %{name}." 1>&2
97 if [ -n "`getgid netsaint`" -a "`getgid netsaint`" = "72" ]; then
98 /usr/sbin/groupmod -n %{nsgrp} netsaint
100 /usr/sbin/groupadd -g 72 -f %{nsgrp}
103 if [ -n "`id -u %{nsusr} 2>/dev/null`" ]; then
104 if [ "`id -u %{nsusr}`" != "72" ]; then
105 echo "Error: user %{nsusr} doesn't have uid=72. Correct this before installing %{name}." 1>&2
109 if [ -n "`id -u netsaint 2>/dev/null`" -a "`id -u netsaint`" = "72" ]; then
110 /usr/sbin/usermod -d /tmp -l %{nsusr} netsaint
112 /usr/sbin/useradd -u 72 -d %{_libdir}/%{nsusr} -s /bin/false -c "%{name} User" -g %{nsgrp} %{nsusr} 1>&2
117 /sbin/chkconfig --add nrpe
118 if [ -f /var/lock/subsys/nrpe ]; then
119 /etc/rc.d/init.d/nrpe restart 1>&2
123 if [ "$1" = "0" ] ; then
124 if [ -f /var/lock/subsys/nrpe ]; then
125 /etc/rc.d/init.d/nrpe stop 1>&2
127 /sbin/chkconfig --del nrpe
131 if [ "$1" = "0" ]; then
133 %groupremove %{nsgrp}
137 %defattr(644,root,root,755)
138 %doc Changelog LEGAL README* SECURITY
139 %attr(754,root,root) /etc/rc.d/init.d/nrpe
140 %attr(751,root,%{nsgrp}) %dir %{_sysconfdir}
141 %attr(644,root,%{nsgrp}) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/nrpe.cfg
142 %attr(755,root,root) %{_sbindir}/nrpe
143 %dir %{_libdir}/nagios
146 %defattr(644,root,root,755)
148 %attr(755,root,root) %{_plugindir}/*