diff options
| author | Remi Collet <remi@remirepo.net> | 2018-03-15 11:31:56 +0100 | 
|---|---|---|
| committer | Remi Collet <remi@remirepo.net> | 2018-03-15 11:31:56 +0100 | 
| commit | 3f6696dcec69c8560cd5bb21827573b0c9efcc37 (patch) | |
| tree | c83acbd1a3fee43103e0217649edbd83c3f22967 | |
| parent | f22e035f5a64e5db68e66c7d4f2efde9c2e71552 (diff) | |
add file trigger to restart the php-fpm service when new pool or new extension installed (F27+)
| -rw-r--r-- | php.spec | 22 | 
1 files changed, 13 insertions, 9 deletions
| @@ -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 | 
