]> git.pld-linux.org Git - packages/nagios-nrpe.git/blame_incremental - nagios-nrpe.spec
- unify plugin config name
[packages/nagios-nrpe.git] / nagios-nrpe.spec
... / ...
CommitLineData
1Summary: Nagios remote plugin execution service/plugin
2Summary(pl.UTF-8): Demon i wtyczka zdalnego wywoływania wtyczek Nagios
3Name: nagios-nrpe
4Version: 2.12
5Release: 8
6License: GPL v2
7Group: Networking
8Source0: http://dl.sourceforge.net/nagios/nrpe-%{version}.tar.gz
9# Source0-md5: b2d75e2962f1e3151ef58794d60c9e97
10Source1: nrpe.init
11Source2: nrpe-command.cfg
12Patch0: %{name}-config.patch
13URL: http://www.nagios.org/
14BuildRequires: autoconf
15BuildRequires: automake
16BuildRequires: openssl-devel
17BuildRequires: openssl-tools
18BuildRequires: rpmbuild(macros) >= 1.268
19Requires(post,preun): /sbin/chkconfig
20Requires: nagios-common
21Requires: rc-scripts
22Provides: nagios-core
23Obsoletes: netsaint-nrpe
24BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26%define _sysconfdir /etc/nagios
27%define _datadir %{_prefix}/share/%{name}
28%define _plugindir %{_libdir}/nagios/plugins
29%define _libexecdir %{_plugindir}
30%define _localstatedir %{_var}/log/nagios
31%define nsport 5666
32
33%description
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).
41
42%description -l pl.UTF-8
43NRPE to dodatek do Nagiosa pozwalający na wywoływanie "lokalnych"
44wtyczek (takich jak check_disk, check_procs itp.) na zdalnych
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
49szyfrowanie SSL/TLS (w trybie anonimowego DH).
50
51%package -n nagios-plugin-check_nrpe
52Summary: check_nrpe plugin for Nagios
53Summary(pl.UTF-8): Wtyczka check_nrpe dla Nagiosa
54Group: Networking
55Requires: nagios-core
56Provides: %{name}-plugin = %{version}-%{release}
57Obsoletes: %{name}-plugin < 2.12-6
58
59%description -n nagios-plugin-check_nrpe
60check_nrpe plugin for Nagios. This plugin allows running plugins on
61remote machines using nrpe service.
62
63%description -n nagios-plugin-check_nrpe -l pl.UTF-8
64Wtyczka check_nrpe dla Nagiosa. Pozwala na zdalne uruchamianie wtyczek
65na innych komputerach za pomocą demona nrpe.
66
67%prep
68%setup -q -n nrpe-%{version}
69%patch0 -p1
70
71%build
72%{__aclocal}
73%{__autoconf}
74
75%configure \
76 --with-init-dir=/etc/rc.d/init.d \
77 --with-nrpe-port=%{nsport} \
78 --with-nrpe-user=nagios \
79 --with-nrpe-grp=nagios \
80 --enable-ssl \
81 --enable-command-args
82
83%{__make} all
84
85%install
86rm -rf $RPM_BUILD_ROOT
87install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/plugins,%{_libdir}/nagios/plugins,%{_sbindir}} \
88 $RPM_BUILD_ROOT{%{_localstatedir},/var/run/nrpe}
89
90install sample-config/nrpe.cfg $RPM_BUILD_ROOT%{_sysconfdir}/nrpe.cfg
91sed -e 's,@plugindir@,%{_plugindir},' %{SOURCE2} > $RPM_BUILD_ROOT%{_sysconfdir}/plugins/check_nrpe.cfg
92install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/nrpe
93install src/nrpe $RPM_BUILD_ROOT%{_sbindir}
94install src/check_nrpe $RPM_BUILD_ROOT%{_plugindir}
95
96%clean
97rm -rf $RPM_BUILD_ROOT
98
99%post
100/sbin/chkconfig --add nrpe
101%service nrpe restart
102
103%preun
104if [ "$1" = "0" ] ; then
105 %service nrpe stop
106 /sbin/chkconfig --del nrpe
107fi
108
109%triggerpostun -- %{name} < 2.6-1.1
110%{__sed} -i -e 's,/var/run/nrpe.pid,/var/run/nrpe/nrpe.pid,' %{_sysconfdir}/nrpe.cfg
111
112%triggerpostun -n nagios-plugin-check_nrpe -- nagios-plugin-check_nrpe < 2.12-7.1
113if [ -f %{_sysconfdir}/plugins/nrpe.cfg.rpmsave ]; then
114 cp -f %{_sysconfdir}/plugins/check_nrpe.cfg{,.rpmnew}
115 mv -f %{_sysconfdir}/plugins/{nrpe.cfg.rpmsave,check_nrpe.cfg}
116 sed -i -e 's,-c \$ARG1\$,$ARG1$,' %{_sysconfdir}/plugins/check_nrpe.cfg
117fi
118
119%files
120%defattr(644,root,root,755)
121%doc Changelog LEGAL README* SECURITY
122%attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nrpe.cfg
123%attr(755,root,root) %{_sbindir}/nrpe
124%attr(754,root,root) /etc/rc.d/init.d/nrpe
125%dir %attr(775,root,nagios) /var/run/nrpe
126
127%files -n nagios-plugin-check_nrpe
128%defattr(644,root,root,755)
129%attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/plugins/check_nrpe.cfg
130%attr(755,root,root) %{_plugindir}/check_nrpe
This page took 0.080486 seconds and 4 git commands to generate.