From ed309532338055277d7f1e879bcea37f82841f32 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 3 Apr 2012 19:10:01 +0000 Subject: [PATCH] * restart running Apache after each update, to force APC to update changed sources and/or Apache configuration --- doc/rpm-build/post_install.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/rpm-build/post_install.php b/doc/rpm-build/post_install.php index 4b0e22be4f..4e95f92e5a 100755 --- a/doc/rpm-build/post_install.php +++ b/doc/rpm-build/post_install.php @@ -385,6 +385,9 @@ else // fix egw_cache evtl. created by root, stoping webserver from accessing it fix_perms(); + // restart running Apache, to force APC to update changed sources and/or Apache configuration + run_cmd($config['start_webserver'].' status && '.$config['start_webserver'].' restart', null, true); + exit($ret); } @@ -418,7 +421,7 @@ function patch_header($filename,&$user,$password) * * @param string $cmd * @param array &$output=null $output of command - * @param int|array $no_bailout=null exit code(s) to NOT bail out + * @param int|array|true $no_bailout=null exit code(s) to NOT bail out, or true to never bail out * @return int exit code of $cmd */ function run_cmd($cmd,array &$output=null,$no_bailout=null) @@ -435,7 +438,7 @@ function run_cmd($cmd,array &$output=null,$no_bailout=null) $output[] = $cmd; exec($cmd,$output,$ret); } - if ($ret && !in_array($ret,(array)$no_bailout)) + if ($ret && $no_bailout !== true && !in_array($ret,(array)$no_bailout)) { bail_out($ret,$verbose?null:$output); }