summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-03-15 11:26:30 +0100
committerRemi Collet <remi@remirepo.net>2018-03-15 11:26:30 +0100
commitcc21f13218b78f97b1a9cd6fed25fada4f02db53 (patch)
treec593beb30002f7acfba65a844ec856e82c0f5253
parent25208813ba6020722084797f7474029745ad87e4 (diff)
add file trigger to restart the php-fpm service when new pool or new extension installed (F27+)
-rw-r--r--php.spec14
1 files changed, 13 insertions, 1 deletions
diff --git a/php.spec b/php.spec
index 05ee324..7cf0340 100644
--- a/php.spec
+++ b/php.spec
@@ -126,7 +126,7 @@
Summary: PHP scripting language for creating dynamic web sites
Name: %{?scl_prefix}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
@@ -1623,6 +1623,7 @@ if [ $1 = 0 ]; then
fi
%endif
+%if 0%{?fedora} < 27 && 0%{?rhel} < 8
%postun fpm
%if %{with_systemd}
%systemd_postun_with_restart %{?scl:%{scl}-}php-fpm.service
@@ -1631,6 +1632,13 @@ if [ $1 -ge 1 ]; then
/sbin/service %{?scl_prefix}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 %{?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
@@ -1833,6 +1841,10 @@ fi
%changelog
+* Thu Mar 15 2018 Remi Collet <remi@remirepo.net> - 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 <remi@remirepo.net> - 7.1.16~RC1-1
- Update to 7.1.16RC1