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
9 # Source0-md5: 70ef9502a3b7e49fa520dbceabfa04d0
11 URL: http://www.nagios.org/
12 BuildRequires: autoconf
13 BuildRequires: automake
14 Requires(pre): /usr/bin/getgid
15 Requires(pre): /bin/id
16 Requires(pre): /usr/sbin/groupadd
17 Requires(pre): /usr/sbin/useradd
18 Requires(post,postun): /sbin/chkconfig
19 Requires: nagios-plugins
20 Obsoletes: netsaint-nrpe
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 %define _sysconfdir /etc/nagios
24 %define _datadir %{_prefix}/share/%{name}
25 %define _plugindir %{_libdir}/nagios/plugins
26 %define _localstatedir %{_var}/log/nagios
32 Nagios nrpe allows you to remotely execute plugins on other hosts
33 and report the plugin output back to the monitoring host.
36 Nagios npre pozwala zdalnie uruchamiaæ wtyczki na innych hostach,
37 a wynik ich dzia³ania zwracaæ spowrotem do hosta monitoruj±cego.
40 Summary: check_nrpe plugin for Nagios
41 Summary(pl): Wtyczka check_nrpe dla Nagiosa
45 check_nrpe plugin for Nagios. This plugin allows running plugins on
46 remote machines using nrpe service.
48 %description plugin -l pl
49 Wtyczka check_nrpe dla Nagiosa. Pozwala na zdalne uruchamianie
50 wtyczek na innych komputerach za pomoc± demona nrpe.
53 %setup -q -n nrpe-%{version}
60 --with-init-dir=/etc/rc.d/init.d \
61 --with-nrpe-port=%{nsport} \
62 --with-nrpe-user=%{nsusr} \
63 --with-nrpe-grp=%{nsgrp} \
65 --exec-prefix=%{_sbindir} \
66 --bindir=%{_sbindir} \
67 --libexecdir=%{_plugindir} \
68 --datadir=%{_prefix}/share/nagios \
69 --sysconfdir=%{_sysconfdir} \
70 --localstatedir=%{_localstatedir}
75 rm -rf $RPM_BUILD_ROOT
76 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir},%{_libdir}/nagios/plugins,%{_sbindir}} \
77 $RPM_BUILD_ROOT%{_localstatedir}
79 install nrpe.cfg $RPM_BUILD_ROOT/etc/nagios/nrpe.cfg
80 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/nrpe
81 install src/nrpe $RPM_BUILD_ROOT%{_sbindir}
82 install src/check_nrpe $RPM_BUILD_ROOT%{_plugindir}
85 rm -rf $RPM_BUILD_ROOT
88 if [ -n "`getgid %{nsgrp}`" ]; then
89 if [ "`getgid %{nsgrp}`" != "72" ]; then
90 echo "Error: group %{nsgrp} doesn't have gid=72. Correct this before installing %{name}." 1>&2
94 /usr/sbin/groupadd -g 72 -f %{nsgrp}
96 if [ -n "`id -u %{nsusr} 2>/dev/null`" ]; then
97 if [ "`id -u %{nsusr}`" != "72" ]; then
98 echo "Error: user %{nsusr} doesn't have uid=72. Correct this before installing %{name}." 1>&2
102 /usr/sbin/useradd -u 72 -d %{_libdir}/%{name} -s /bin/false -c "%{name} User" -g %{nsgrp} %{nsusr} 1>&2
106 /sbin/chkconfig --add %{name}
107 if [ -f /var/lock/subsys/%{name} ]; then
108 /etc/rc.d/init.d/%{name} restart 1>&2
112 if [ "$1" = "0" ] ; then
113 if [ -f /var/lock/subsys/%{name} ]; then
114 /etc/rc.d/init.d/%{name} stop 1>&2
116 /sbin/chkconfig --del %{name}
120 if [ "$1" = "0" ]; then
121 /usr/sbin/userdel %{nsusr}
122 /usr/sbin/groupdel %{nsgrp}
126 %defattr(644,root,root,755)
127 %doc Changelog LEGAL README* SECURITY
128 %attr(754,root,root) /etc/rc.d/init.d/%{name}
129 %attr(751,root,%{nsgrp}) %dir %{_sysconfdir}
130 %attr(644,root,%{nsgrp}) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/nrpe.cfg
131 %attr(755,root,root) %{_sbindir}/nrpe
134 %defattr(644,root,root,755)
136 %attr(755,root,root) %{_plugindir}/*