summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-03-15 09:33:19 +0100
committerRemi Collet <remi@remirepo.net>2018-03-15 09:33:19 +0100
commit97b7162b69be0fafea1df208d8fc36777153c0fd (patch)
tree366294921567dc512dd17b082e242534dfcb4d3a
parentc0adbf67f4591234adb7b8a224ed71486fad8a89 (diff)
add file trigger to restart the php-fpm service when new pool or new extension installed
-rw-r--r--php.spec16
1 files changed, 14 insertions, 2 deletions
diff --git a/php.spec b/php.spec
index c9ffa39..e9cf38a 100644
--- a/php.spec
+++ b/php.spec
@@ -62,7 +62,7 @@
# Regression tests take a long time, you can skip 'em with this
%{!?runselftest: %global runselftest 1}
-#global runselftest 0
+%global runselftest 0
# Use the arch-specific mysql_config binary to avoid mismatch with the
# arch detection heuristic used by bindir/mysql_config.
@@ -130,7 +130,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
@@ -1646,6 +1646,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
@@ -1654,6 +1655,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
+%endif
# Handle upgrading from SysV initscript to native systemd unit.
# We can tell if a SysV version of php-fpm was previously installed by
@@ -1854,6 +1862,10 @@ fi
%changelog
+* Thu Mar 15 2018 Remi Collet <remi@remirepo.net> - 7.2.4~RC1-2
+- add file trigger to restart the php-fpm service
+ when new pool or new extension installed
+
* Tue Mar 13 2018 Remi Collet <remi@remirepo.net> - 7.2.4~RC1-1
- update to 7.2.4RC1