Marius Cramer
2014-05-12 cda98dfeab6a50a9bf9964c2f47ce8f3871cc757
server/mods-available/web_module.inc.php
@@ -217,6 +217,11 @@
      } else {
         exec($app->system->getinitcommand($daemon, 'reload').' 2>&1', $retval['output'], $retval['retval']);
      }
      // nginx: do a syntax check because on some distributions, the init script always returns 0 - even if the syntax is not ok (how stupid is that?)
      if($web_config['server_type'] == 'nginx' && $retval['retval'] == 0){
         exec('nginx -t 2>&1', $retval['output'], $retval['retval']);
      }
      return $retval;
   }
@@ -236,7 +241,9 @@
         $path_parts = pathinfo($init_script);
         $initcommand = $app->system->getinitcommand($path_parts['basename'], $action, $path_parts['dirname']);
         
         if($action == 'reload') {
         if($action == 'reload' && $init_script == $conf['init_scripts'].'/'.$web_config['php_fpm_init_script']) {
            // we have to do a workaround because of buggy ubuntu fpm reload handling
            // @see: https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1242376
            if(file_exists('/etc/os-release')) {
               $tmp = file_get_contents('/etc/os-release');
               if(preg_match('/^ID=ubuntu/m', $tmp) && preg_match('/^VERSION_ID="14\.04"/m', $tmp)) {
@@ -245,7 +252,6 @@
               unset($tmp);
            }
         }
      }
      $retval = array('output' => '', 'retval' => 0);