Changes of Revision 11
[-] | Changed | nrpe.spec |
x 1
2 #!BuildIgnore: post-build-checks 3 %define myname nrpe 4 %define version 2.12 5 -%define release 1 6 +%define release 20 7 %define nsusr nagios 8 %define nsgrp nagios 9 %define nsport 5666 10
11 # Macro that print mesages to syslog at package (un)install time 12 %define nnmmsg logger -t %{name}/rpm 13 14 -Summary: Host/service/network monitoring agent for Nagios 15 -URL: http://www.nagios.org 16 -Name: nagios-nrpe 17 -Version: %{version} 18 -Release: %{release} 19 -License: GPL 20 -Group: Application/System 21 -Source0: %{myname}-%{version}.tar.bz2 22 -Source1: %{myname}-rpmlintrc 23 -Patch0: %{myname}-suse-init.patch 24 -BuildRoot: %{_tmppath}/%{name}-buildroot 25 -Prefix: %{_prefix} 26 -Prefix: /etc/init.d 27 -Prefix: /etc/nagios 28 -Requires: bash, grep, nagios-plugins 29 +Summary: Host/service/network monitoring agent for Nagios 30 +URL: http://www.nagios.org 31 +Name: nagios-nrpe 32 +Version: %{version} 33 +Release: %{release} 34 +License: GPL 35 +Group: Application/System 36 +Source0: %{myname}-%{version}.tar.bz2 37 +Source1: %{myname}-rpmlintrc 38 +Patch0: %{myname}-suse-init.patch 39 +Patch1: %{myname}-config.patch 40 +BuildRoot: %{_tmppath}/%{name}-buildroot 41 +Prefix: %{_prefix} 42 +Prefix: /etc/init.d 43 +Prefix: /etc/nagios 44 +Requires: bash, grep, nagios-plugins 45 %if 0%{?suse_version} 46 PreReq: /bin/logger, sed, mktemp 47 %endif 48
49 %prep 50 %setup -q -n %{myname}-%{version} 51 %patch0 52 +%patch1 53 54 %pre 55 # Create `nagios' group on the system if necessary 56
57 /sbin/service nrpe condrestart >/dev/null 2>&1 || : 58 fi 59 60 +%post 61 +if [ -f /etc/sudoers ] ; then 62 + echo "nagios ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/" >> /etc/sudoers 63 +fi 64 + 65 %build 66 export PATH=$PATH:/usr/sbin 67 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" \ 68
69 install -d -m 0755 ${RPM_BUILD_ROOT}/etc/init.d 70 install -d -m 0755 ${RPM_BUILD_ROOT}/etc/xinetd.d 71 install -d -m 0755 ${RPM_BUILD_ROOT}/etc/nagios 72 +install -d -m 0755 ${RPM_BUILD_ROOT}/etc/nagios/nrpe.d 73 install -d -m 0755 ${RPM_BUILD_ROOT}/usr/sbin 74 install -d -m 0755 ${RPM_BUILD_ROOT}/usr/lib/nagios/plugins 75 76
77 %config(noreplace)/etc/xinetd.d/nrpe 78 %{_prefix}/sbin/nrpe 79 %dir /etc/nagios 80 +%dir /etc/nagios/nrpe.d/ 81 %defattr(644,root,root) 82 %config(noreplace) /etc/nagios/*.cfg 83 %defattr(644,%{nsusr},%{nsgrp}) 84
85 %doc Changelog LEGAL README 86 87 %changelog 88 +* Tue Apr 20 2010 Carsten Schoene <cs@linux-administrator.com> - 2.12-20 89 +- added nrpe_local.cfg and nrpe.d directory to nrpe configuration 90 +- activated sudo by default 91 + 92 * Tue Mar 11 2008 Carsten Schoene <cs@linux-administrator.com> 93 - version bump to 2.12 94 - Fix for unterminated multiline plugin (garbage) output (Krzysztof Oledzki) 95 |
||
[+] | Added | nrpe-config.patch ^ |
@@ -0,0 +1,25 @@ +--- sample-config/nrpe.cfg.in.orig 2010-04-20 09:02:50.459690200 +0200 ++++ sample-config/nrpe.cfg.in 2010-04-20 09:03:38.218535336 +0200 +@@ -113,7 +113,7 @@ + # without asking for a password. If you do this, make sure you don't give + # random users write access to that directory or its contents! + +-# command_prefix=/usr/bin/sudo ++command_prefix=/usr/bin/sudo + + + +@@ -213,3 +213,13 @@ + #command[check_load]=@libexecdir@/check_load -w $ARG1$ -c $ARG2$ + #command[check_disk]=@libexecdir@/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$ + #command[check_procs]=@libexecdir@/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$ ++ ++# ++# local configuration: ++# if you'd prefer, you can instead place directives here ++include=/etc/nagios/nrpe_local.cfg ++ ++# ++# you can place your config snipplets into nrpe.d/ ++include_dir=/etc/nagios/nrpe.d/ ++ |