]> git.pld-linux.org Git - packages/mk-livestatus.git/commitdiff
create config containing sample how to load this broker module
authorElan Ruusamäe <glen@delfi.ee>
Wed, 5 Aug 2015 21:25:50 +0000 (00:25 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Wed, 5 Aug 2015 21:25:50 +0000 (00:25 +0300)
mk-livestatus.spec

index 4a858c6a990fec38b5539eb323c4f06def8d921b..4eb6369d1a2e730fb6d5f56396bbf123b53469c3 100644 (file)
@@ -10,6 +10,9 @@ Source0:      https://mathias-kettner.de/download/%{name}-%{version}.tar.gz
 URL:           http://mathias-kettner.de/checkmk_livestatus.html
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define                _sysconfdir     /etc/nagios
+%define                _libdir         %{_prefix}/%{_lib}/nagios
+
 %description
 Livestatus. Just as NDO, Livestatus make use of the Nagios Event
 Broker API and loads a binary module into your Nagios process. But
@@ -34,13 +37,19 @@ rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_libdir}
 
 %{__make} -j1 install \
+       pkglibdir=%{_libdir} \
        DESTDIR=$RPM_BUILD_ROOT
 
+# sample line that should be added to nagios.cfg for this module to work
+install -d $RPM_BUILD_ROOT%{_sysconfdir}
+echo 'broker_module=%{_libdir}/livestatus.o' \
+       > $RPM_BUILD_ROOT%{_sysconfdir}/livestatus-load.cfg
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/livestatus-load.cfg
 %attr(755,root,root) %{_bindir}/unixcat
-%dir %{_libdir}/%{name}
-%{_libdir}/%{name}/livestatus.o
+%attr(755,root,root) %{_libdir}/livestatus.o
This page took 0.867982 seconds and 4 git commands to generate.