]> git.pld-linux.org Git - packages/monitoring-plugin-check_file_exists.git/commitdiff
add nrpe trigger auto/th/monitoring-plugin-check_file_exists-1.0-2
authorElan Ruusamäe <glen@delfi.ee>
Mon, 1 Feb 2016 08:48:23 +0000 (10:48 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Mon, 1 Feb 2016 08:48:23 +0000 (10:48 +0200)
monitoring-plugin-check_file_exists.spec

index d0ac04d19b78ab173b839736939638ebb24a6545..18116207291dcca9a432a737109b16455e4533e7 100644 (file)
@@ -2,7 +2,7 @@
 Summary:       Monitoring plugin to check if a file exists or not
 Name:          monitoring-plugin-%{plugin}
 Version:       1.0
 Summary:       Monitoring plugin to check if a file exists or not
 Name:          monitoring-plugin-%{plugin}
 Version:       1.0
-Release:       1
+Release:       2
 License:       GPL
 Group:         Networking
 Source0:       %{plugin}.sh
 License:       GPL
 Group:         Networking
 Source0:       %{plugin}.sh
@@ -11,6 +11,7 @@ URL:          https://exchange.nagios.org/directory/Plugins/System-Metrics/File-System/c
 BuildRequires: rpmbuild(macros) >= 1.654
 Requires:      nagios-common
 Requires:      nagios-plugins-libs
 BuildRequires: rpmbuild(macros) >= 1.654
 Requires:      nagios-common
 Requires:      nagios-plugins-libs
+Conflicts:     nagios-nrpe < 2.15-5
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -30,11 +31,19 @@ rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{nrpeddir},%{plugindir}}
 install -p %{plugin} $RPM_BUILD_ROOT%{plugindir}/%{plugin}
 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg
 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{nrpeddir},%{plugindir}}
 install -p %{plugin} $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
 
 
 %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}
 %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}
+%ghost %{nrpeddir}/%{plugin}.cfg
This page took 0.084405 seconds and 4 git commands to generate.