summaryrefslogtreecommitdiffstats
path: root/php.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-03-15 11:31:56 +0100
committerRemi Collet <remi@remirepo.net>2018-03-15 11:31:56 +0100
commit3f6696dcec69c8560cd5bb21827573b0c9efcc37 (patch)
treec83acbd1a3fee43103e0217649edbd83c3f22967 /php.spec
parentf22e035f5a64e5db68e66c7d4f2efde9c2e71552 (diff)
add file trigger to restart the php-fpm service when new pool or new extension installed (F27+)
Diffstat (limited to 'php.spec')
-rw-r--r--php.spec22
1 files changed, 13 insertions, 9 deletions
diff --git a/php.spec b/php.spec
index e0d8226..d279f6c 100644
--- a/php.spec
+++ b/php.spec
@@ -129,7 +129,7 @@
%endif
#global rcver RC1
-%global rpmrel 1
+%global rpmrel 2
Summary: PHP scripting language for creating dynamic web sites
Name: %{?scl_prefix}php
@@ -1622,16 +1622,10 @@ if [ $1 = 0 ]; then
fi
%endif
+%if 0%{?fedora} < 27 && 0%{?rhel} < 8
%postun fpm
-%if 0%{?systemd_postun_with_restart:1}
-%systemd_postun_with_restart %{?scl:%{scl}-}php-fpm.service
-%else
%if %{with_systemd}
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ]; then
- # Package upgrade, not uninstall
- /bin/systemctl try-restart %{?scl_prefix}php-fpm.service >/dev/null 2>&1 || :
-fi
+%systemd_postun_with_restart %{?scl:%{scl}-}php-fpm.service
%else
if [ $1 -ge 1 ]; then
/sbin/service %{?scl_prefix}php-fpm condrestart >/dev/null 2>&1 || :
@@ -1639,6 +1633,12 @@ fi
%endif
%endif
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+# Raised by new pool installation or new extension installation
+%transfiletriggerin fpm -- %{_sysconfdir}/php-fpm.d %{_sysconfdir}/php.d
+systemctl try-restart %{?scl:%{scl}-}php-fpm.service >/dev/null 2>&1 || :
+%endif
+
# Handle upgrading from SysV initscript to native systemd unit.
# We can tell if a SysV version of php-fpm was previously installed by
# checking to see if the initscript is present.
@@ -1834,6 +1834,10 @@ fi
%changelog
+* Thu Mar 15 2018 Remi Collet <remi@remirepo.net> - 5.6.34-2
+- add file trigger to restart the php-fpm service
+ when new pool or new extension installed (F27+)
+
* Wed Feb 28 2018 Remi Collet <remi@remirepo.net> - 5.6.34-1
- Update to 5.6.34 - http://www.php.net/releases/5_6_34.php
- FPM: revert pid file removal