Browse Source

update debug.py

master
Prabuddha Chakraborty 9 years ago
parent
commit
79ac4ef0bb
  1. 6
      ee/cli/plugins/debug.py

6
ee/cli/plugins/debug.py

@ -335,7 +335,7 @@ class EEDebugController(CementBaseController):
self.msg = self.msg + ['/var/log/php/7.0/slow.log'] self.msg = self.msg + ['/var/log/php/7.0/slow.log']
# PHP global debug stop # PHP global debug stop
elif (self.app.pargs.php == 'off' and not self.app.pargs.site_name): elif (self.app.pargs.php7 == 'off' and not self.app.pargs.site_name):
if EEShellExec.cmd_exec(self, " sed -n \"/upstream php {/,/}/p\" " if EEShellExec.cmd_exec(self, " sed -n \"/upstream php {/,/}/p\" "
"/etc/nginx/conf.d/upstream.conf " "/etc/nginx/conf.d/upstream.conf "
"| grep 9170"): "| grep 9170"):
@ -385,7 +385,7 @@ class EEDebugController(CementBaseController):
self.msg = self.msg + ['/var/log/php/7.0/fpm.log'] self.msg = self.msg + ['/var/log/php/7.0/fpm.log']
# PHP5-FPM stop global debug # PHP5-FPM stop global debug
elif (self.app.pargs.fpm == 'off' and not self.app.pargs.site_name): elif (self.app.pargs.fpm7 == 'off' and not self.app.pargs.site_name):
if EEShellExec.cmd_exec(self, "grep \"log_level = debug\" " if EEShellExec.cmd_exec(self, "grep \"log_level = debug\" "
"/etc/php/7.0/fpm/php-fpm.conf"): "/etc/php/7.0/fpm/php-fpm.conf"):
Log.info(self, "Disabling PHP7.0-FPM log_level = debug") Log.info(self, "Disabling PHP7.0-FPM log_level = debug")
@ -627,6 +627,7 @@ class EEDebugController(CementBaseController):
# Reload PHP # Reload PHP
if self.trigger_php: if self.trigger_php:
if EEVariables.ee_platform_codename == 'trusty': if EEVariables.ee_platform_codename == 'trusty':
if EEAptGet.is_installed(self,'php5.6-fpm'):
EEService.reload_service(self, 'php5.6-fpm') EEService.reload_service(self, 'php5.6-fpm')
if EEAptGet.is_installed(self,'php7.0-fpm'): if EEAptGet.is_installed(self,'php7.0-fpm'):
EEService.reload_service(self, 'php7.0-fpm') EEService.reload_service(self, 'php7.0-fpm')
@ -774,6 +775,7 @@ class EEDebugController(CementBaseController):
# Reload PHP # Reload PHP
if self.trigger_php: if self.trigger_php:
if EEVariables.ee_platform_codename == 'trusty': if EEVariables.ee_platform_codename == 'trusty':
if EEAptGet.is_installed(self,'php5.6-fpm'):
EEService.restart_service(self, 'php5.6-fpm') EEService.restart_service(self, 'php5.6-fpm')
if EEAptGet.is_installed(self,'php7.0-fpm'): if EEAptGet.is_installed(self,'php7.0-fpm'):
EEService.restart_service(self, 'php7.0-fpm') EEService.restart_service(self, 'php7.0-fpm')

Loading…
Cancel
Save