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

Contents 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.1 - (show annotations) (download)
Wed Feb 27 17:53:47 2008 UTC (16 years, 9 months ago) by slords
Branch: MAIN
Remove version from spec

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

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