From b0dde6965223098ea5611c499eb004c8af059143 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 13 Mar 2017 13:54:30 +0100 Subject: php: cleanup PIDFile and EnvironmentFile --- php-fpm.service | 1 - php.spec | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) 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/php.spec b/php.spec index 4c2e13f..ac610a1 100644 --- a/php.spec +++ b/php.spec @@ -1421,10 +1421,14 @@ sed -e 's:/run:%{_localstatedir}/run:' \ -i $RPM_BUILD_ROOT%{_root_sysconfdir}/logrotate.d/%{?scl_prefix}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 sed -e 's:php-fpm.service:%{?scl_prefix}php-fpm.service:' \ -i $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/php-fpm +%endif # make the cli commands available in standard root for SCL build %if 0%{?scl:1} @@ -1724,7 +1728,9 @@ fi %config(noreplace) %{_sysconfdir}/php-fpm.conf %config(noreplace) %{_sysconfdir}/php-fpm.d/www.conf %config(noreplace) %{_root_sysconfdir}/logrotate.d/%{?scl_prefix}php-fpm +%if 0%{?fedora} < 26 %config(noreplace) %{_sysconfdir}/sysconfig/php-fpm +%endif # {_prefix}/lib/tmpfiles.d/php-fpm.conf %if %{with_systemd} %{_unitdir}/%{?scl_prefix}php-fpm.service -- cgit