2 # - /etc/nagios - owned by nagios and nagios-nrpe. obsolete eachother?
3 # put /etc/nagios to nagios-dirs? (-base?)
4 # - /usr/lib/nagios/plugins - not owned by nagios-nrpe, but it doesn't
5 # require nagios which packages that dir. create nagios-dirs (-base)
10 Summary: Nagios remote plugin execution service/plugin
11 Summary(pl): Demon i wtyczka zdalnego wywo³ywania wtyczek Nagios
17 Source0: http://dl.sourceforge.net/nagios/nrpe-%{version}.tar.gz
18 # Source0-md5: 70ef9502a3b7e49fa520dbceabfa04d0
20 URL: http://www.nagios.org/
21 BuildRequires: autoconf
22 BuildRequires: automake
23 BuildRequires: rpmbuild(macros) >= 1.202
24 BuildRequires: openssl-tools
25 Requires(pre): /usr/bin/getgid
26 Requires(pre): /bin/id
27 Requires(pre): /usr/sbin/groupadd
28 Requires(pre): /usr/sbin/useradd
29 Requires(post,postun): /sbin/chkconfig
30 Requires: nagios-plugins
31 Provides: group(%{nsgrp})
32 Provides: user(%{nsusr})
34 Obsoletes: netsaint-nrpe
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 %define _sysconfdir /etc/nagios
38 %define _datadir %{_prefix}/share/%{name}
39 %define _plugindir %{_libdir}/nagios/plugins
40 %define _localstatedir %{_var}/log/nagios
44 Nagios nrpe allows you to remotely execute plugins on other hosts
45 and report the plugin output back to the monitoring host.
48 Nagios npre pozwala zdalnie uruchamiaæ wtyczki na innych hostach,
49 a wynik ich dzia³ania zwracaæ z powrotem do hosta monitoruj±cego.
52 Summary: check_nrpe plugin for Nagios
53 Summary(pl): Wtyczka check_nrpe dla Nagiosa
57 check_nrpe plugin for Nagios. This plugin allows running plugins on
58 remote machines using nrpe service.
60 %description plugin -l pl
61 Wtyczka check_nrpe dla Nagiosa. Pozwala na zdalne uruchamianie
62 wtyczek na innych komputerach za pomoc± demona nrpe.
65 %setup -q -n nrpe-%{version}
72 --with-init-dir=/etc/rc.d/init.d \
73 --with-nrpe-port=%{nsport} \
74 --with-nrpe-user=%{nsusr} \
75 --with-nrpe-grp=%{nsgrp} \
77 --exec-prefix=%{_sbindir} \
78 --bindir=%{_sbindir} \
79 --libexecdir=%{_plugindir} \
80 --datadir=%{_prefix}/share/nagios \
81 --sysconfdir=%{_sysconfdir} \
82 --localstatedir=%{_localstatedir}
87 rm -rf $RPM_BUILD_ROOT
88 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir},%{_libdir}/nagios/plugins,%{_sbindir}} \
89 $RPM_BUILD_ROOT%{_localstatedir}
91 install nrpe.cfg $RPM_BUILD_ROOT/etc/nagios/nrpe.cfg
92 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/nrpe
93 install src/nrpe $RPM_BUILD_ROOT%{_sbindir}
94 install src/check_nrpe $RPM_BUILD_ROOT%{_plugindir}
97 rm -rf $RPM_BUILD_ROOT
101 if [ -n "`getgid netsaint`" ] && [ "`getgid netsaint`" = "72" ]; then
102 /usr/sbin/groupmod -n %{nsgrp} netsaint
104 %groupadd -g 72 -f %{nsgrp}
107 if [ -n "`id -u netsaint 2>/dev/null`" ] && [ "`id -u netsaint`" = "72" ]; then
108 /usr/sbin/usermod -d /tmp -l %{nsusr} netsaint
110 %useradd -u 72 -d %{_libdir}/%{nsusr} -s /bin/false -c "%{name} User" -g %{nsgrp} %{nsusr}
113 /sbin/chkconfig --add nrpe
114 if [ -f /var/lock/subsys/nrpe ]; then
115 /etc/rc.d/init.d/nrpe restart 1>&2
119 if [ "$1" = "0" ] ; then
120 if [ -f /var/lock/subsys/nrpe ]; then
121 /etc/rc.d/init.d/nrpe stop 1>&2
123 /sbin/chkconfig --del nrpe
127 if [ "$1" = "0" ]; then
129 %groupremove %{nsgrp}
133 %defattr(644,root,root,755)
134 %doc Changelog LEGAL README* SECURITY
135 %attr(754,root,root) /etc/rc.d/init.d/nrpe
136 %attr(751,root,%{nsgrp}) %dir %{_sysconfdir}
137 %attr(644,root,%{nsgrp}) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/nrpe.cfg
138 %attr(755,root,root) %{_sbindir}/nrpe
139 %dir %{_libdir}/nagios
142 %defattr(644,root,root,755)
144 %attr(755,root,root) %{_plugindir}/*