4 Summary: Nagios remote plugin execution service/plugin
5 Summary(pl): Demon i wtyczka zdalnego wywo³ywania wtyczek Nagios
11 Source0: http://dl.sourceforge.net/nagios/nrpe-%{version}.tar.gz
13 URL: http://www.nagios.org/
14 BuildRequires: autoconf
15 BuildRequires: automake
16 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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
24 %define _sysconfdir /etc/nagios
25 %define _datadir %{_prefix}/share/%{name}
26 %define _plugindir %{_libdir}/nagios/plugins
27 %define _localstatedir %{_var}/log/nagios
33 Nagios nrpe allows you to remotely execute plugins on other hosts
34 and report the plugin output back to the monitoring host.
37 Nagios npre pozwala zdalnie uruchamiaæ wtyczki na innych hostach,
38 a wynik ich dzia³ania zwracaæ spowrotem do hosta monitoruj±cego.
41 Summary: check_nrpe plugin for Nagios
42 Summary(pl): Wtyczka check_nrpe dla Nagiosa
46 check_nrpe plugin for Nagios. This plugin allows running plugins on
47 remote machines using nrpe service.
49 %description plugin -l pl
50 Wtyczka check_nrpe dla Nagiosa. Pozwala na zdalne uruchamianie
51 wtyczek na innych komputerach za pomoc± demona nrpe.
61 --with-init-dir=/etc/rc.d/init.d \
62 --with-nrpe-port=%{nsport} \
63 --with-nrpe-user=%{nsusr} \
64 --with-nrpe-grp=%{nsgrp} \
66 --exec-prefix=%{_sbindir} \
67 --bindir=%{_sbindir} \
68 --libexecdir=%{_plugindir} \
69 --datadir=%{_prefix}/share/nagios \
70 --sysconfdir=%{_sysconfdir} \
71 --localstatedir=%{_localstatedir}
76 rm -rf $RPM_BUILD_ROOT
77 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir},%{_libdir}/nagios/plugins,%{_sbindir}} \
78 $RPM_BUILD_ROOT%{_localstatedir}
80 install nrpe.cfg $RPM_BUILD_ROOT/etc/nagios/nrpe.cfg
81 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
82 install src/nrpe $RPM_BUILD_ROOT%{_sbindir}
83 install src/check_nrpe $RPM_BUILD_ROOT%{_plugindir}
86 rm -rf $RPM_BUILD_ROOT
89 if [ -n "`getgid %{nsgrp}`" ]; then
90 if [ "`getgid %{nsgrp}`" != "72" ]; then
91 echo "Error: group %{nsgrp} doesn't have gid=72. Correct this before installing %{name}." 1>&2
95 /usr/sbin/groupadd -g 72 -f %{nsgrp}
97 if [ -n "`id -u %{nsusr} 2>/dev/null`" ]; then
98 if [ "`id -u %{nsusr}`" != "72" ]; then
99 echo "Error: user %{nsusr} doesn't have uid=72. Correct this before installing %{name}." 1>&2
103 /usr/sbin/useradd -u 72 -d %{_libdir}/%{name} -s /bin/false -c "%{name} User" -g %{nsgrp} %{nsusr} 1>&2
107 /sbin/chkconfig --add %{name}
108 if [ -f /var/lock/subsys/%{name} ]; then
109 /etc/rc.d/init.d/%{name} restart 1>&2
113 if [ "$1" = "0" ] ; then
114 if [ -f /var/lock/subsys/%{name} ]; then
115 /etc/rc.d/init.d/%{name} stop 1>&2
117 /sbin/chkconfig --del %{name}
121 if [ "$1" = "0" ]; then
122 /usr/sbin/userdel %{nsusr}
123 /usr/sbin/groupdel %{nsgrp}
127 %defattr(644,root,root,755)
128 %doc Changelog LEGAL README* SECURITY
129 %attr(754,root,root) /etc/rc.d/init.d/%{name}
130 %attr(751,root,%{nsgrp}) %dir %{_sysconfdir}
131 %attr(644,root,%{nsgrp}) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/nrpe.cfg
132 %attr(755,root,root) %{_sbindir}/nrpe
135 %defattr(644,root,root,755)
137 %attr(755,root,root) %{_plugindir}/*