summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2017-03-13 13:54:30 +0100
committerRemi Collet <fedora@famillecollet.com>2017-03-13 13:54:30 +0100
commitea3432638d34f76568602c608ec0e7818caf45d3 (patch)
tree5d26ca07d16ef8f025c50e15a2c59bdc4611ed89
parent87056d5c3ef0c49fe93712948b40a6ffbc0aff92 (diff)
php: cleanup PIDFile and EnvironmentFile
-rw-r--r--php-fpm.service1
-rw-r--r--php71.spec6
2 files changed, 6 insertions, 1 deletions
diff --git a/php-fpm.service b/php-fpm.service
index b4d528f..687dfc0 100644
--- a/php-fpm.service
+++ b/php-fpm.service
@@ -8,7 +8,6 @@ After=syslog.target network.target
[Service]
Type=notify
-PIDFile=/run/php-fpm/php-fpm.pid
EnvironmentFile=/etc/sysconfig/php-fpm
ExecStart=/usr/sbin/php-fpm --nodaemonize
ExecReload=/bin/kill -USR2 $MAINPID
diff --git a/php71.spec b/php71.spec
index 3f2ebb6..13f1a50 100644
--- a/php71.spec
+++ b/php71.spec
@@ -1650,8 +1650,12 @@ mv $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.d/www.conf.default .
install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
install -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/php-fpm
# Environment file
+%if 0%{?fedora} >= 26
+sed -e '/EnvironmentFile/d' -i $RPM_BUILD_ROOT%{_root_initddir}/%{?scl_prefix}php-fpm
+%else
install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
install -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/php-fpm
+%endif
%if %{with_systemd}
install -m 755 -d $RPM_BUILD_ROOT/run/php-fpm
# tmpfiles.d
@@ -1959,7 +1963,9 @@ fi
%config(noreplace) %{_sysconfdir}/php-fpm.conf
%config(noreplace) %{_sysconfdir}/php-fpm.d/www.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/php-fpm
+%if 0%{?fedora} < 26
%config(noreplace) %{_sysconfdir}/sysconfig/php-fpm
+%endif
%if %{with_nginx}
%config(noreplace) %{_sysconfdir}/nginx/conf.d/php-fpm.conf
%config(noreplace) %{_sysconfdir}/nginx/default.d/php.conf