fix for configuring php-fpm like php on f27
[myplc.git] / myplc.spec
index 60a982c..2806623 100644 (file)
@@ -57,6 +57,10 @@ Requires: cronie
 %if "%{distro}" == "Fedora" && %{distrorelease} >= 16
 Requires: rpm-sign
 %endif
+# starting with f27 we depend on this new rpm
+%if "%{distro}" == "Fedora" && %{distrorelease} >= 27
+Requires: php-fpm
+%endif
 
 # planetlab stuff
 Requires: bootmanager
@@ -202,6 +206,11 @@ if [ -x /sbin/chkconfig ] ; then
     /sbin/chkconfig plc on
 fi
 
+%if "%{distro}" == "Fedora" && %{distrorelease} >= 27
+systemctl enable php-fpm
+systemctl start  php-fpm
+%endif
+
 %triggerpostun -- %{name}
 # 0 = erase, 1 = upgrade
 if [ $1 -gt 0 ] ; then