]> git.pld-linux.org Git - packages/monitoring-plugin-check_file_exists.git/blobdiff - monitoring-plugin-check_file_exists.spec
release 1.2
[packages/monitoring-plugin-check_file_exists.git] / monitoring-plugin-check_file_exists.spec
index d0ac04d19b78ab173b839736939638ebb24a6545..ba14d33a2961be8500c05474e3f67abe4409116a 100644 (file)
@@ -1,7 +1,7 @@
 %define                plugin  check_file_exists
 Summary:       Monitoring plugin to check if a file exists or not
 Name:          monitoring-plugin-%{plugin}
-Version:       1.0
+Version:       1.2
 Release:       1
 License:       GPL
 Group:         Networking
@@ -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
+Conflicts:     nagios-nrpe < 2.15-5
 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
+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}
+%ghost %{nrpeddir}/%{plugin}.cfg
This page took 0.05668 seconds and 4 git commands to generate.