Marius Burkard
2016-04-19 b2cee83e8894e89fd3e0793c84fb92a8cf928613
server/mods-available/web_module.inc.php
@@ -265,17 +265,20 @@
            // @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)) {
               //if(preg_match('/^ID=ubuntu/m', $tmp) && preg_match('/^VERSION_ID="14\.04"/m', $tmp)) {
               if(preg_match('/^ID=ubuntu/m', $tmp) && preg_match('/^VERSION_ID="14\.04"/m', $tmp) && stristr(phpversion(), 'deb.sury.org') === false) {
                  $initcommand = '/sbin/start-stop-daemon --stop --signal USR2 --quiet --pidfile /var/run/php5-fpm.pid --name php5-fpm';
               }
               // And the next workaround, php-fpm reloads in centos 7 downt work as well.
                                        /*
               if(preg_match('/^ID=centos/m', $tmp) && preg_match('/^VERSION_ID="7"/m', $tmp)) {
                  $initcommand = 'systemctl restart php-fpm.service';
               }
                                        */
               unset($tmp);
            }   
         }
         /*
         if($action == 'reload') {
            // And the next workaround, php-fpm reloads in centos 7 downt work as well.
            if(file_exists('/etc/os-release')) {
@@ -287,6 +290,7 @@
               unset($tmp);
            }
         }
                        */
      }
      $retval = array('output' => '', 'retval' => 0);