From f1910611dc91daa4a447edc88d4e087b091703ff Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 17 Oct 2013 14:05:12 +0200 Subject: [PATCH] spec: icinga2-classicui-config depends on icinga2, enable required features. --- icinga2.spec.in | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/icinga2.spec.in b/icinga2.spec.in index 322412afe..c563f47ff 100644 --- a/icinga2.spec.in +++ b/icinga2.spec.in @@ -144,6 +144,7 @@ IDOUtils schema >= 1.10 Summary: Icinga 2 Classic UI Standalone configuration Group: Applications/System Requires: %{apachename} +Requires: %{name} = %{version}-%{release} Provides: icinga-classicui-config Conflicts: icinga-gui-config @@ -200,6 +201,22 @@ if [ "$1" = "0" ]; then test -x %{_sbindir}/i2disfeature && %{_sbindir}/i2disfeature ido-mysql fi +%post classicui-config +if [ ${1:-0} -eq 1 ] +then + # initial installation, enable features + %{_sbindir}/i2enfeature statusdata + %{_sbindir}/i2enfeature compatlog + %{_sbindir}/i2enfeature command +fi + +%postun classicui-config +if [ "$1" = "0" ]; then + # deinstallation of the package - remove feature + test -x %{_sbindir}/i2disfeature && %{_sbindir}/i2disfeature statusdata + test -x %{_sbindir}/i2disfeature && %{_sbindir}/i2disfeature compatlog + test -x %{_sbindir}/i2disfeature && %{_sbindir}/i2disfeature command +fi %files %defattr(-,root,root,-)