]> git.pld-linux.org Git - packages/nagios-nrpe.git/blame - nagios-nrpe.spec
- up to 2.13, add /etc/nagios/nrpe.d for nrpe config fragments
[packages/nagios-nrpe.git] / nagios-nrpe.spec
CommitLineData
9f54c7ed 1Summary: Nagios remote plugin execution service/plugin
32b335f7 2Summary(pl.UTF-8): Demon i wtyczka zdalnego wywoływania wtyczek Nagios
884ffea2 3Name: nagios-nrpe
56070b30
ER
4Version: 2.13
5Release: 1
6095acef
PZ
6License: GPL v2
7Group: Networking
56070b30
ER
8Source0: http://downloads.sourceforge.net/nagios/nrpe-%{version}.tar.gz
9# Source0-md5: e5176d9b258123ce9cf5872e33a77c1a
283125e4 10Source1: nrpe.init
8a6ed10e 11Source2: nrpe-command.cfg
dc04870c 12Patch0: %{name}-config.patch
6095acef
PZ
13URL: http://www.nagios.org/
14BuildRequires: autoconf
15BuildRequires: automake
bef67369 16BuildRequires: openssl-devel
f384e93f 17BuildRequires: openssl-tools
c18c6a62 18BuildRequires: rpmbuild(macros) >= 1.268
74881710 19Requires(post,preun): /sbin/chkconfig
fab2344e 20Requires: nagios-common
783f405f 21Requires: rc-scripts
7186fe13 22Provides: nagios-core
c1473eca 23Obsoletes: netsaint-nrpe
884ffea2 24BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
6095acef
PZ
25
26%define _sysconfdir /etc/nagios
27%define _datadir %{_prefix}/share/%{name}
28%define _plugindir %{_libdir}/nagios/plugins
fcdb117d 29%define _libexecdir %{_plugindir}
6095acef 30%define _localstatedir %{_var}/log/nagios
6095acef
PZ
31%define nsport 5666
32
33%description
e47ef220
ER
34NRPE is an addon for Nagios that allows you to execute "local" plugins
35(like check_disk, check_procs, etc.) on remote hosts. The check_nrpe
36plugin is called from Nagios and makes plugin execution requests to
37the NRPE daemon running on the remote host (either as a standalone
38daemon or as a service under inetd). Supports passing command
39arguments to server, as well as native SSL/TLS encryption (anonymous
40DH mode).
6095acef 41
84d968ba
JR
42%description -l pl.UTF-8
43NRPE to dodatek do Nagiosa pozwalający na wywoływanie "lokalnych"
d951bfe3 44wtyczek (takich jak check_disk, check_procs itp.) na zdalnych
84d968ba
JR
45maszynach. Wtyczka check_nrpe jest wywoływana z poziomu Nagiosa i
46wysyła żądania uruchomienia wtyczek do demona NRPE działającego na
47zdalnej maszynie (jako samodzielny demon lub usługa inetd). Obsługuje
48przekazywanie argumentów poleceń do serwera, a także natywne
d951bfe3 49szyfrowanie SSL/TLS (w trybie anonimowego DH).
6095acef 50
0a9173a1 51%package -n nagios-plugin-check_nrpe
6095acef 52Summary: check_nrpe plugin for Nagios
32b335f7 53Summary(pl.UTF-8): Wtyczka check_nrpe dla Nagiosa
6095acef 54Group: Networking
f4d9de42 55Requires: nagios-common
0a9173a1 56Provides: %{name}-plugin = %{version}-%{release}
56070b30 57Obsoletes: nagios-nrpe-plugin < 2.12-6
6095acef 58
0a9173a1 59%description -n nagios-plugin-check_nrpe
6095acef
PZ
60check_nrpe plugin for Nagios. This plugin allows running plugins on
61remote machines using nrpe service.
62
0a9173a1 63%description -n nagios-plugin-check_nrpe -l pl.UTF-8
783f405f 64Wtyczka check_nrpe dla Nagiosa. Pozwala na zdalne uruchamianie wtyczek
84d968ba 65na innych komputerach za pomocą demona nrpe.
6095acef
PZ
66
67%prep
283125e4 68%setup -q -n nrpe-%{version}
e3dd2648 69%patch0 -p1
6095acef
PZ
70
71%build
72%{__aclocal}
73%{__autoconf}
74
75%configure \
6095acef 76 --with-nrpe-port=%{nsport} \
e8316598 77 --with-nrpe-user=nagios \
56070b30 78 --with-nrpe-group=nagios \
ba61d89b
JK
79 --enable-ssl \
80 --enable-command-args
6095acef
PZ
81
82%{__make} all
83
84%install
85rm -rf $RPM_BUILD_ROOT
56070b30 86install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/{plugins,nrpe.d},%{_libdir}/nagios/plugins,%{_sbindir}} \
ce845d3e 87 $RPM_BUILD_ROOT{%{_localstatedir},/var/run/nrpe}
6095acef 88
56070b30 89cp -p sample-config/nrpe.cfg $RPM_BUILD_ROOT%{_sysconfdir}/nrpe.cfg
5dffe4d7 90sed -e 's,@plugindir@,%{_plugindir},' %{SOURCE2} > $RPM_BUILD_ROOT%{_sysconfdir}/plugins/check_nrpe.cfg
56070b30
ER
91install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/nrpe
92install -p src/nrpe $RPM_BUILD_ROOT%{_sbindir}
93install -p src/check_nrpe $RPM_BUILD_ROOT%{_plugindir}
6095acef
PZ
94
95%clean
96rm -rf $RPM_BUILD_ROOT
97
6095acef 98%post
50034c16 99/sbin/chkconfig --add nrpe
c18c6a62 100%service nrpe restart
6095acef
PZ
101
102%preun
103if [ "$1" = "0" ] ; then
c18c6a62 104 %service nrpe stop
50034c16 105 /sbin/chkconfig --del nrpe
6095acef
PZ
106fi
107
ce845d3e
ER
108%triggerpostun -- %{name} < 2.6-1.1
109%{__sed} -i -e 's,/var/run/nrpe.pid,/var/run/nrpe/nrpe.pid,' %{_sysconfdir}/nrpe.cfg
110
5dffe4d7
ER
111%triggerpostun -n nagios-plugin-check_nrpe -- nagios-plugin-check_nrpe < 2.12-7.1
112if [ -f %{_sysconfdir}/plugins/nrpe.cfg.rpmsave ]; then
113 cp -f %{_sysconfdir}/plugins/check_nrpe.cfg{,.rpmnew}
114 mv -f %{_sysconfdir}/plugins/{nrpe.cfg.rpmsave,check_nrpe.cfg}
115 sed -i -e 's,-c \$ARG1\$,$ARG1$,' %{_sysconfdir}/plugins/check_nrpe.cfg
116fi
117
6095acef
PZ
118%files
119%defattr(644,root,root,755)
120%doc Changelog LEGAL README* SECURITY
783f405f 121%attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nrpe.cfg
56070b30 122%attr(750,root,nagios) %dir %{_sysconfdir}/nrpe.d
6095acef 123%attr(755,root,root) %{_sbindir}/nrpe
ce845d3e
ER
124%attr(754,root,root) /etc/rc.d/init.d/nrpe
125%dir %attr(775,root,nagios) /var/run/nrpe
6095acef 126
0a9173a1 127%files -n nagios-plugin-check_nrpe
6095acef 128%defattr(644,root,root,755)
5dffe4d7 129%attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/plugins/check_nrpe.cfg
8a6ed10e 130%attr(755,root,root) %{_plugindir}/check_nrpe
This page took 0.171323 seconds and 4 git commands to generate.