|
@ -8,6 +8,7 @@ from ee.core.services import EEService |
|
|
from ee.core.logging import Log |
|
|
from ee.core.logging import Log |
|
|
from ee.cli.plugins.site_functions import logwatch |
|
|
from ee.cli.plugins.site_functions import logwatch |
|
|
from ee.core.variables import EEVariables |
|
|
from ee.core.variables import EEVariables |
|
|
|
|
|
from ee.core.fileutils import EEFileUtils |
|
|
import os |
|
|
import os |
|
|
import configparser |
|
|
import configparser |
|
|
import glob |
|
|
import glob |
|
@ -170,6 +171,12 @@ class EEDebugController(CementBaseController): |
|
|
encoding='utf-8', mode='w') |
|
|
encoding='utf-8', mode='w') |
|
|
self.app.render((data), 'upstream.mustache', out=ee_nginx) |
|
|
self.app.render((data), 'upstream.mustache', out=ee_nginx) |
|
|
ee_nginx.close() |
|
|
ee_nginx.close() |
|
|
|
|
|
# Enable xdebug |
|
|
|
|
|
EEFileUtils.searchreplace(self, "/etc/php5/mods-available/" |
|
|
|
|
|
"xdebug.ini", |
|
|
|
|
|
";zend_extension", |
|
|
|
|
|
"zend_extension") |
|
|
|
|
|
|
|
|
self.trigger_php = True |
|
|
self.trigger_php = True |
|
|
self.trigger_nginx = True |
|
|
self.trigger_nginx = True |
|
|
else: |
|
|
else: |
|
@ -190,6 +197,12 @@ class EEDebugController(CementBaseController): |
|
|
encoding='utf-8', mode='w') |
|
|
encoding='utf-8', mode='w') |
|
|
self.app.render((data), 'upstream.mustache', out=ee_nginx) |
|
|
self.app.render((data), 'upstream.mustache', out=ee_nginx) |
|
|
ee_nginx.close() |
|
|
ee_nginx.close() |
|
|
|
|
|
# Disable xdebug |
|
|
|
|
|
EEFileUtils.searchreplace(self, "/etc/php5/mods-available/" |
|
|
|
|
|
"xdebug.ini", |
|
|
|
|
|
"zend_extension", |
|
|
|
|
|
";zend_extension") |
|
|
|
|
|
|
|
|
self.trigger_php = True |
|
|
self.trigger_php = True |
|
|
self.trigger_nginx = True |
|
|
self.trigger_nginx = True |
|
|
else: |
|
|
else: |
|
@ -531,7 +544,7 @@ class EEDebugController(CementBaseController): |
|
|
EEService.reload_service(self, 'nginx') |
|
|
EEService.reload_service(self, 'nginx') |
|
|
# Reload PHP |
|
|
# Reload PHP |
|
|
if self.trigger_php: |
|
|
if self.trigger_php: |
|
|
EEService.reload_service(self, 'php5-fpm') |
|
|
EEService.restart_service(self, 'php5-fpm') |
|
|
|
|
|
|
|
|
if len(self.msg) > 0: |
|
|
if len(self.msg) > 0: |
|
|
if not self.app.pargs.interactive: |
|
|
if not self.app.pargs.interactive: |
|
|