1 Summary: Nagios remote plugin execution service/plugin
2 Summary(pl): Demon i wtyczka zdalnego wywo³ywania wtyczek Nagios
8 Source0: http://dl.sourceforge.net/nagios/nrpe-%{version}.tar.gz
10 URL: http://www.nagios.org/
11 BuildRequires: autoconf
12 BuildRequires: automake
13 Requires(pre): /usr/bin/getgid
14 Requires(pre): /bin/id
15 Requires(pre): /usr/sbin/groupadd
16 Requires(pre): /usr/sbin/useradd
17 Requires(post,postun): /sbin/chkconfig
18 Requires: nagios-plugins
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 %define _sysconfdir /etc/nagios
22 %define _datadir %{_prefix}/share/%{name}
23 %define _plugindir %{_libdir}/nagios/plugins
24 %define _localstatedir %{_var}/log/nagios
30 Nagios nrpe allows you to remotely execute plugins on other hosts
31 and report the plugin output back to the monitoring host.
34 Nagios npre pozwala zdalnie uruchamiaæ wtyczki na innych hostach,
35 a wynik ich dzia³ania zwracaæ spowrotem do hosta monitoruj±cego.
38 Summary: check_nrpe plugin for Nagios
39 Summary(pl): Wtyczka check_nrpe dla Nagiosa
43 check_nrpe plugin for Nagios. This plugin allows running plugins on
44 remote machines using nrpe service.
46 %description plugin -l pl
47 Wtyczka check_nrpe dla Nagiosa. Pozwala na zdalne uruchamianie
48 wtyczek na innych komputerach za pomoc± demona nrpe.
58 --with-init-dir=/etc/rc.d/init.d \
59 --with-nrpe-port=%{nsport} \
60 --with-nrpe-user=%{nsusr} \
61 --with-nrpe-grp=%{nsgrp} \
63 --exec-prefix=%{_sbindir} \
64 --bindir=%{_sbindir} \
65 --libexecdir=%{_plugindir} \
66 --datadir=%{_prefix}/share/nagios \
67 --sysconfdir=%{_sysconfdir} \
68 --localstatedir=%{_localstatedir}
73 rm -rf $RPM_BUILD_ROOT
74 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir},%{_libdir}/nagios/plugins,%{_sbindir}} \
75 $RPM_BUILD_ROOT%{_localstatedir}
77 install nrpe.cfg $RPM_BUILD_ROOT/etc/nagios/nrpe.cfg
78 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
79 install src/nrpe $RPM_BUILD_ROOT%{_sbindir}
80 install src/check_nrpe $RPM_BUILD_ROOT%{_plugindir}
83 rm -rf $RPM_BUILD_ROOT
86 if [ -n "`getgid %{nsgrp}`" ]; then
87 if [ "`getgid %{nsgrp}`" != "72" ]; then
88 echo "Error: group %{nsgrp} doesn't have gid=72. Correct this before installing %{name}." 1>&2
92 /usr/sbin/groupadd -g 72 -f %{nsgrp}
94 if [ -n "`id -u %{nsusr} 2>/dev/null`" ]; then
95 if [ "`id -u %{nsusr}`" != "72" ]; then
96 echo "Error: user %{nsusr} doesn't have uid=72. Correct this before installing %{name}." 1>&2
100 /usr/sbin/useradd -u 72 -d %{_libdir}/%{name} -s /bin/false -c "%{name} User" -g %{nsgrp} %{nsusr} 1>&2
104 /sbin/chkconfig --add %{name}
105 if [ -f /var/lock/subsys/%{name} ]; then
106 /etc/rc.d/init.d/%{name} restart 1>&2
110 if [ "$1" = "0" ] ; then
111 if [ -f /var/lock/subsys/%{name} ]; then
112 /etc/rc.d/init.d/%{name} stop 1>&2
114 /sbin/chkconfig --del %{name}
118 if [ "$1" = "0" ]; then
119 /usr/sbin/userdel %{nsusr}
120 /usr/sbin/groupdel %{nsgrp}
124 %defattr(644,root,root,755)
125 %doc Changelog LEGAL README* SECURITY
126 %attr(754,root,root) /etc/rc.d/init.d/%{name}
127 %attr(751,root,%{nsgrp}) %dir %{_sysconfdir}
128 %attr(644,root,%{nsgrp}) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/nrpe.cfg
129 %attr(755,root,root) %{_sbindir}/nrpe
132 %defattr(644,root,root,755)
134 %attr(755,root,root) %{_plugindir}/*