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 Requires(pre): /usr/bin/getgid
17 Requires(pre): /bin/id
18 Requires(pre): /usr/sbin/groupadd
19 Requires(pre): /usr/sbin/useradd
20 Requires(post,postun): /sbin/chkconfig
21 Requires: nagios-plugins
22 Provides: group(%{nsgrp})
23 Provides: user(%{nsusr})
24 Obsoletes: netsaint-nrpe
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 %define _sysconfdir /etc/nagios
28 %define _datadir %{_prefix}/share/%{name}
29 %define _plugindir %{_libdir}/nagios/plugins
30 %define _localstatedir %{_var}/log/nagios
34 Nagios nrpe allows you to remotely execute plugins on other hosts
35 and report the plugin output back to the monitoring host.
38 Nagios npre pozwala zdalnie uruchamiaæ wtyczki na innych hostach,
39 a wynik ich dzia³ania zwracaæ spowrotem do hosta monitoruj±cego.
42 Summary: check_nrpe plugin for Nagios
43 Summary(pl): Wtyczka check_nrpe dla Nagiosa
47 check_nrpe plugin for Nagios. This plugin allows running plugins on
48 remote machines using nrpe service.
50 %description plugin -l pl
51 Wtyczka check_nrpe dla Nagiosa. Pozwala na zdalne uruchamianie
52 wtyczek na innych komputerach za pomoc± demona nrpe.
55 %setup -q -n nrpe-%{version}
62 --with-init-dir=/etc/rc.d/init.d \
63 --with-nrpe-port=%{nsport} \
64 --with-nrpe-user=%{nsusr} \
65 --with-nrpe-grp=%{nsgrp} \
67 --exec-prefix=%{_sbindir} \
68 --bindir=%{_sbindir} \
69 --libexecdir=%{_plugindir} \
70 --datadir=%{_prefix}/share/nagios \
71 --sysconfdir=%{_sysconfdir} \
72 --localstatedir=%{_localstatedir}
77 rm -rf $RPM_BUILD_ROOT
78 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir},%{_libdir}/nagios/plugins,%{_sbindir}} \
79 $RPM_BUILD_ROOT%{_localstatedir}
81 install nrpe.cfg $RPM_BUILD_ROOT/etc/nagios/nrpe.cfg
82 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/nrpe
83 install src/nrpe $RPM_BUILD_ROOT%{_sbindir}
84 install src/check_nrpe $RPM_BUILD_ROOT%{_plugindir}
87 rm -rf $RPM_BUILD_ROOT
90 if [ -n "`getgid %{nsgrp}`" ]; then
91 if [ "`getgid %{nsgrp}`" != "72" ]; then
92 echo "Error: group %{nsgrp} doesn't have gid=72. Correct this before installing %{name}." 1>&2
96 /usr/sbin/groupadd -g 72 -f %{nsgrp}
98 if [ -n "`id -u %{nsusr} 2>/dev/null`" ]; then
99 if [ "`id -u %{nsusr}`" != "72" ]; then
100 echo "Error: user %{nsusr} doesn't have uid=72. Correct this before installing %{name}." 1>&2
104 /usr/sbin/useradd -u 72 -d %{_libdir}/%{name} -s /bin/false -c "%{name} User" -g %{nsgrp} %{nsusr} 1>&2
108 /sbin/chkconfig --add %{name}
109 if [ -f /var/lock/subsys/%{name} ]; then
110 /etc/rc.d/init.d/%{name} restart 1>&2
114 if [ "$1" = "0" ] ; then
115 if [ -f /var/lock/subsys/%{name} ]; then
116 /etc/rc.d/init.d/%{name} stop 1>&2
118 /sbin/chkconfig --del %{name}
122 if [ "$1" = "0" ]; then
124 %groupremove %{nsgrp}
128 %defattr(644,root,root,755)
129 %doc Changelog LEGAL README* SECURITY
130 %attr(754,root,root) /etc/rc.d/init.d/%{name}
131 %attr(751,root,%{nsgrp}) %dir %{_sysconfdir}
132 %attr(644,root,%{nsgrp}) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/nrpe.cfg
133 %attr(755,root,root) %{_sbindir}/nrpe
136 %defattr(644,root,root,755)
138 %attr(755,root,root) %{_plugindir}/*