From bbe93f2fa0c052de86cbf104c5969286623b2fae Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 15 Mar 2018 11:34:24 +0100 Subject: add file trigger to restart the php-fpm service when new pool or new extension installed (F27+) --- php71.spec | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/php71.spec b/php71.spec index 29d2db3..016ef8c 100644 --- a/php71.spec +++ b/php71.spec @@ -113,7 +113,7 @@ Summary: PHP scripting language for creating dynamic web sites Name: php Version: %{upver}%{?rcver:~%{rcver}} -Release: 1%{?dist} +Release: 2%{?dist} # All files licensed under PHP version 3.01, except # Zend is licensed under Zend # TSRM is licensed under BSD @@ -1847,6 +1847,7 @@ if [ $1 = 0 ]; then fi %endif +%if 0%{?fedora} < 27 && 0%{?rhel} < 8 %postun fpm %if %{with_systemd} %systemd_postun_with_restart php-fpm.service @@ -1855,6 +1856,13 @@ if [ $1 -ge 1 ]; then /sbin/service php-fpm condrestart >/dev/null 2>&1 || : 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 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 @@ -2052,6 +2060,10 @@ fi %changelog +* Thu Mar 15 2018 Remi Collet - 7.1.16~RC1-2 +- add file trigger to restart the php-fpm service + when new pool or new extension installed (F27+) + * Wed Mar 14 2018 Remi Collet - 7.1.16~RC1-1 - Update to 7.1.16RC1 -- cgit