From e6ca24e8d3a24cdd0674972d9ed7a10181dbdd6e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Thu, 14 Dec 2006 08:18:00 +0000 Subject: [PATCH] - add %php_webserver_restart, %php4_webserver_restart, RFC welcome Changed files: rpm.macros -> 1.342 --- rpm.macros | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/rpm.macros b/rpm.macros index e6f662c..dd7d62d 100644 --- a/rpm.macros +++ b/rpm.macros @@ -577,6 +577,18 @@ fi \ # for php pdo modules (php-pecl-PDO_*) %requires_php_pdo_module %{__php_api_requires PDO_API php_pdo_api_version} +# for using PHP post scripts. for PHP >= 5.0 +%php_webserver_restart \ +[ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart \ +[ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart \ +%{nil} + +# for using php post scripts. for PHP >= 4.0 && PHP < 5.0 +%php4_webserver_restart \ +[ ! -f /etc/apache/conf.d/??_mod_php4.conf ] || %service -q apache restart \ +[ ! -f /etc/httpd/httpd.conf/??_mod_php4.conf ] || %service -q httpd restart \ +%{nil} + # Python specific macro definitions. # python main version %py_ver %(python -c "import sys; print sys.version[:3]") -- 2.43.0