From 054c7b407b357cd01be0e7bef3d27ca11f4e4f5a Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 24 Jul 2015 13:15:47 +0200 Subject: [PATCH] RPM/php-fpm: Call a2enmod rewrite on SLES/OpenSUSE refs #9669 --- icingaweb2_php-fpm.spec | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/icingaweb2_php-fpm.spec b/icingaweb2_php-fpm.spec index 6a1d57abc..905ef4e0f 100644 --- a/icingaweb2_php-fpm.spec +++ b/icingaweb2_php-fpm.spec @@ -179,6 +179,9 @@ Icinga Web 2 vendor library Zend %prep %setup -q +%clean +rm -rf %{buildroot} + %build %install @@ -226,9 +229,6 @@ fi %endif exit 0 -%clean -rm -rf %{buildroot} - %files %defattr(-,root,root) %{basedir}/application/controllers @@ -249,6 +249,14 @@ rm -rf %{buildroot} %{docsdir} %docdir %{docsdir} +%post +%if 0%{?suse_version} +if ! apache2ctl -M 2>/dev/null | grep -q rewrite_module; then + a2enmod rewrite >/dev/null +fi +%endif +exit 0 + %pre common if ! getent group %{icingaweb_group} >/dev/null; then