[packages/mk-livestatus] restart nagios when module is upgraded

glen glen at pld-linux.org
Wed Aug 5 23:40:20 CEST 2015


commit 7904d6e2c9000f8d0743ced60d80493cc2d15237
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Aug 6 00:40:05 2015 +0300

    restart nagios when module is upgraded

 mk-livestatus.spec | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/mk-livestatus.spec b/mk-livestatus.spec
index 1632894..15eb836 100644
--- a/mk-livestatus.spec
+++ b/mk-livestatus.spec
@@ -9,6 +9,7 @@ Source0:	https://mathias-kettner.de/download/%{name}-%{version}.tar.gz
 # Source0-md5:	a01b3cc372f5dbe672eee29afeb94dd5
 Patch0:		socket-path.patch
 URL:		http://mathias-kettner.de/checkmk_livestatus.html
+BuildRequires:	rpmbuild(macros) >= 1.268
 Requires:	nagios >= 4.0
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -52,6 +53,15 @@ echo 'broker_module=%{_libdir}/livestatus.o' \
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+%service -q nagios restart
+
+%postun
+if [ "$1" = 0 ]; then
+	%service -q nagios restart
+fi
+
+
 %files
 %defattr(644,root,root,755)
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/livestatus-load.cfg
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mk-livestatus.git/commitdiff/7904d6e2c9000f8d0743ced60d80493cc2d15237



More information about the pld-cvs-commit mailing list