From 81f73a805da4e81330a0c8d5635813f25935ed58 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Wed, 14 Oct 2015 10:04:15 +0000 Subject: [PATCH] - moved async(d) to separate package --- munin.spec | 45 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/munin.spec b/munin.spec index 4286364..4070868 100644 --- a/munin.spec +++ b/munin.spec @@ -6,7 +6,7 @@ Summary: Munin - the Linpro RRD data agent Summary(pl.UTF-8): Munin - agent danych RRD Linpro Name: munin Version: 2.0.25 -Release: 1 +Release: 2 License: GPL Group: Applications/WWW Source0: http://downloads.sourceforge.net/munin/%{name}-%{version}.tar.gz @@ -70,6 +70,19 @@ Munin, znany poprzednio jako serwer RRD Linpro, odpytuje wiele węzłów i przetwarza dane przy użyciu RRDtoola, a następnie prezentuje je na stronach WWW. +%package async +Summary: Munin asynchronous proxy client/server +Summary(pl.UTF-8): Klient/serwer asynchronicznego proxy dla Munina +Group: Daemons +Requires(post,preun): /sbin/chkconfig +Requires: %{name}-node = %{version}-%{release} + +%description async +Asynchronous proxy client/server for Munin node. + +%description async -l pl.UTF-8 +Klient/serwer asynchronicznego proxy dla węzła Munina. + %package common Summary: Munin - the Linpro RRD data agent - common files Summary(pl.UTF-8): Munin - agent danych RRD Linpro - wspólne pliki @@ -213,25 +226,34 @@ for f in cgi-graph cgi-html graph html limits update ; do chown munin:http /var/log/munin/munin-$f.log done +%post async +if [ "$1" = "1" ] ; then + /sbin/chkconfig --add munin-asyncd +fi +%service munin-asyncd try-restart "Munin Asyncd" + +%preun async +if [ "$1" = "0" ] ; then + %service munin-asyncd stop + /sbin/chkconfig --del munin-asyncd +fi + %post node if [ "$1" = "1" ] ; then /sbin/chkconfig --add munin-node %{_sbindir}/munin-node-configure --shell | sh fi -%service munin-node restart "Munin Node agent" -%service munin-asyncd try-restart "Munin Asyncd agent" +%service munin-node restart "Munin Node" %preun node if [ "$1" = "0" ] ; then - %service munin-asyncd stop %service munin-node stop /sbin/chkconfig --del munin-node - /sbin/chkconfig --del munin-asyncd fi %pre common %groupadd -g 158 munin -%useradd -o -u 158 -s /bin/false -g munin -c "Munin Node agent" -d /var/lib/munin munin +%useradd -o -u 158 -s /bin/false -g munin -c "Munin Node" -d /var/lib/munin munin %postun common if [ "$1" = "0" ]; then @@ -302,6 +324,13 @@ fi %{perl_vendorlib}/Munin/Common %{_mandir}/man3/Munin::Common* +%files async +%defattr(644,root,root,755) +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/munin-asyncd +%attr(754,root,root) /etc/rc.d/init.d/munin-asyncd +%attr(755,root,root) %{_sbindir}/munin-asyncd +%attr(755,root,root) %{_datadir}/munin/munin-async + %files node %defattr(644,root,root,755) %dir %{_sysconfdir} @@ -311,11 +340,8 @@ fi %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/plugins.conf %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/plugin-conf.d/munin-node %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/munin-node -%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/munin-asyncd -%attr(754,root,root) /etc/rc.d/init.d/munin-asyncd %attr(754,root,root) /etc/rc.d/init.d/munin-node %attr(755,root,root) %{_bindir}/munindoc -%attr(755,root,root) %{_sbindir}/munin-asyncd %attr(755,root,root) %{_sbindir}/munin-node %attr(755,root,root) %{_sbindir}/munin-node-configure %attr(755,root,root) %{_sbindir}/munin-run @@ -323,7 +349,6 @@ fi %{perl_vendorlib}/Munin/Node %{perl_vendorlib}/Munin/Plugin %{perl_vendorlib}/Munin/Plugin.pm -%attr(755,root,root) %{_datadir}/munin/munin-async %dir %{_datadir}/munin/plugins %attr(755,root,root) %{_datadir}/munin/plugins/* %if !%{with sybase} -- 2.37.3