/[smecontribs]/rpms/smeserver-nagios-nrpe/contribs7/smeserver-nagios-nrpe.spec
ViewVC logotype

Annotation of /rpms/smeserver-nagios-nrpe/contribs7/smeserver-nagios-nrpe.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.5 - (hide annotations) (download)
Tue Nov 25 16:20:26 2008 UTC (16 years ago) by slords
Branch: MAIN
Changes since 1.4: +0 -0 lines
Restore

1 slords 1.4 # $Id: smeserver-nagios-nrpe.spec,v 1.3 2008/04/02 15:03:58 slords Exp $
2 slords 1.3 # Authority: mweinber
3     # Name: Michael Weinberger
4    
5 slords 1.1 Summary: Nagios nrpe integration
6     %define name smeserver-nagios-nrpe
7     Name: %{name}
8     %define version 1.0.3
9     %define release 0
10     Version: %{version}
11 slords 1.2 Release: %{release}%{?dist}
12 slords 1.1 License: GPL
13     Group: Applications/System
14     Source: %{name}-%{version}.tar.gz
15     BuildRoot: /var/tmp/%{name}-buildroot/
16     BuildArch: noarch
17     Requires: smeserver-release >= 7.1.3
18     Requires: nagios-nrpe >= 2.5.2
19     Requires: nagios-plugins-nrpe >= 2.5.2
20     Requires: nagios-plugins
21 slords 1.2 BuildRequires: e-smith-devtools
22 slords 1.1
23     AutoReq: no
24    
25     %changelog
26     * Mon Dec 03 2007 Michael Weinberger <mweinber@neddix.de>
27     Version 1.0.3
28     modified templateexpand in events (/etc/sudoer perms bug)
29    
30     * Thu Oct 15 2007 Michael Weinberger <mweinber@neddix.de>
31     - Initial release
32    
33     %description
34     Nagios nrpe integration
35    
36     Setting the TCP wrapper allowed hosts:
37     config setprop nrpe HostsAllow "127.0.0.1 10.203.104.0/255.255.252.0 172.22.32.0/255.255.240.0"
38     expand-template /etc/hosts.allow
39    
40     To execute plugins as root:
41     config setprop nrpe sudoPlugins yes
42     expand-template /etc/sudoers
43     And set command_prefix=/usr/bin/sudo in /etc/nagios/nrpe.cfg
44    
45    
46     To check the connection run:
47     /usr/lib/nagios/plugins/check_nrpe -H NRPE_SERVER_IP
48     Expected Output is: "NRPE v2.5.1"
49    
50    
51     %prep
52     %setup -q -n %{name}-%{version}
53    
54     %build
55    
56     %install
57     rm -rf $RPM_BUILD_ROOT
58     (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
59     rm -f %{name}-%{version}-filelist
60     /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
61     >> %{name}-%{version}-filelist
62     find $RPM_BUILD_ROOT -depth -type l -print |\
63     sed "s@^$RPM_BUILD_ROOT@@g" >> %{name}-%{version}-filelist
64    
65     %clean
66     rm -rf $RPM_BUILD_ROOT
67    
68     %post
69     /sbin/e-smith/config printtype nrpe > /dev/null || /sbin/e-smith/config set nrpe service
70     if [ "x`/bin/cat /proc/1/cmdline`" = "xinit [7]" ] ; then
71     /sbin/e-smith/expand-template /etc/hosts.allow
72     /sbin/e-smith/expand-template /etc/sudoers
73     /sbin/e-smith/service nrpe restart
74     fi
75    
76     %preun
77     if [ "x`/bin/cat /proc/1/cmdline`" = "xinit [7]" ] ; then
78     if [ $1 = 0 ] ; then # uninstall
79     /sbin/e-smith/service nrpe stop
80     fi
81     fi
82    
83    
84     %postun
85     if [ "x`/bin/cat /proc/1/cmdline`" = "xinit [7]" ] ; then
86     if [ $1 = 0 ] ; then # uninstall
87     /sbin/e-smith/expand-template /etc/hosts.allow
88     echo -n
89     fi
90     fi
91    
92     %files -f %{name}-%{version}-filelist
93     %defattr(-,root,root)

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed