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