commit 4f78721fee3e3ce0a4e41c313029340a2e62ccde
Author: Elan Ruusamäe <[email protected]>
Date:   Fri Feb 14 01:25:46 2014 +0200

    hook into nrpe config; rel 3

 nagios-plugin-check_vserver_count.spec | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)
---
diff --git a/nagios-plugin-check_vserver_count.spec 
b/nagios-plugin-check_vserver_count.spec
index 018bbf1..cbceda8 100644
--- a/nagios-plugin-check_vserver_count.spec
+++ b/nagios-plugin-check_vserver_count.spec
@@ -1,18 +1,21 @@
-# $Revision: 1.17 $, $Date: 2011/12/22 13:16:57 $
 %define                plugin  check_vserver_count
 Summary:       Nagios plugin to check vserver count
 Name:          nagios-plugin-%{plugin}
 Version:       0.2
-Release:       2
+Release:       3
 License:       GPL v2
 Group:         Networking
 Source0:       %{plugin}.sh
 Source1:       %{plugin}.cfg
+BuildRequires: rpmbuild(macros) >= 1.685
+Requires:      grep
 Requires:      nagios-common
+Requires:      sed >= 4.0
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _sysconfdir     /etc/nagios/plugins
+%define                nrpeddir        /etc/nagios/nrpe.d
 %define                plugindir       %{_prefix}/lib/nagios/plugins
 
 %description
@@ -24,21 +27,22 @@ actually running count.
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{plugindir}}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{nrpeddir},%{plugindir}}
 install -p %{SOURCE0} $RPM_BUILD_ROOT%{plugindir}/%{plugin}
 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg
+touch $RPM_BUILD_ROOT%{nrpeddir}/%{plugin}.cfg
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%triggerin -- nagios-nrpe
+%nagios_nrpe -a %{plugin} -f %{_sysconfdir}/%{plugin}.cfg
+
+%triggerun -- nagios-nrpe
+%nagios_nrpe -d %{plugin} -f %{_sysconfdir}/%{plugin}.cfg
+
 %files
 %defattr(644,root,root,755)
 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) 
%{_sysconfdir}/%{plugin}.cfg
 %attr(755,root,root) %{plugindir}/%{plugin}
-
-%define date   %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
-%changelog
-* %{date} PLD Team <[email protected]>
-All persons listed below can be reached at <cvs_login>@pld-linux.org
-
-$Log: nagios-plugin.spec,v $
+%ghost %{nrpeddir}/%{plugin}.cfg
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nagios-plugin-check_vserver_count.git/commitdiff/4f78721fee3e3ce0a4e41c313029340a2e62ccde

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to