|
@ -14,6 +14,37 @@ import glob |
|
|
import signal |
|
|
import signal |
|
|
import subprocess |
|
|
import subprocess |
|
|
|
|
|
|
|
|
|
|
|
usage = """ |
|
|
|
|
|
Usage: ee debug {<sitename>} {arguments} |
|
|
|
|
|
arguments : |
|
|
|
|
|
--all [{on,off}] start/stop debugging all server parameters. |
|
|
|
|
|
--nginx [{on,off}] start/stop debugging nginx server configuration for site |
|
|
|
|
|
--rewrite [{on,off}] start/stop debugging nginx rewrite rules for site |
|
|
|
|
|
--php [{on,off}] start/stop debugging server php configuration |
|
|
|
|
|
--fpm [{on,off}] start/stop debugging fastcgi configuration |
|
|
|
|
|
--mysql [{on,off}] start/stop debugging mysql server |
|
|
|
|
|
--wp [{on,off}] start/stop wordpress debugging |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Usage example: |
|
|
|
|
|
# This is global option will affect all sites |
|
|
|
|
|
# start debugging all server parameters |
|
|
|
|
|
|
|
|
|
|
|
ee debug --all / --all=on |
|
|
|
|
|
# stop debugging for all server parameters |
|
|
|
|
|
|
|
|
|
|
|
ee debug --all=off |
|
|
|
|
|
|
|
|
|
|
|
#This is site specific option will affect specific site mentioned |
|
|
|
|
|
# start debugging all server parameters for example.com |
|
|
|
|
|
|
|
|
|
|
|
ee debug example.com --all / --all=on |
|
|
|
|
|
|
|
|
|
|
|
# stop debugging for all server parameters available for example.com |
|
|
|
|
|
|
|
|
|
|
|
ee debug example.com --all=off |
|
|
|
|
|
""" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def debug_plugin_hook(app): |
|
|
def debug_plugin_hook(app): |
|
|
# do something with the ``app`` object here. |
|
|
# do something with the ``app`` object here. |
|
@ -27,10 +58,10 @@ class EEDebugController(CementBaseController): |
|
|
stacked_on = 'base' |
|
|
stacked_on = 'base' |
|
|
stacked_type = 'nested' |
|
|
stacked_type = 'nested' |
|
|
arguments = [ |
|
|
arguments = [ |
|
|
# (['--stop'], |
|
|
(['--stop'], |
|
|
# dict(help='Stop debug', action='store_true')), |
|
|
dict(help='Stop debug', action='store_true')), |
|
|
# (['--start'], |
|
|
(['--start'], |
|
|
# dict(help='Start debug', action='store_true')), |
|
|
dict(help='Start debug', action='store_true')), |
|
|
(['--nginx'], |
|
|
(['--nginx'], |
|
|
dict(help='start/stop debugging nginx server ' |
|
|
dict(help='start/stop debugging nginx server ' |
|
|
'configuration for site', |
|
|
'configuration for site', |
|
@ -466,44 +497,15 @@ class EEDebugController(CementBaseController): |
|
|
self.trigger_nginx = False |
|
|
self.trigger_nginx = False |
|
|
self.trigger_php = False |
|
|
self.trigger_php = False |
|
|
|
|
|
|
|
|
# if self.app.pargs.stop: |
|
|
|
|
|
# self.start = False |
|
|
|
|
|
|
|
|
|
|
|
if ((not self.app.pargs.nginx) and (not self.app.pargs.php) |
|
|
if ((not self.app.pargs.nginx) and (not self.app.pargs.php) |
|
|
and (not self.app.pargs.fpm) and (not self.app.pargs.mysql) |
|
|
and (not self.app.pargs.fpm) and (not self.app.pargs.mysql) |
|
|
and (not self.app.pargs.wp) and (not self.app.pargs.rewrite) |
|
|
and (not self.app.pargs.wp) and (not self.app.pargs.rewrite) |
|
|
and (not self.app.pargs.all) |
|
|
and (not self.app.pargs.all) |
|
|
and (not self.app.pargs.site_name)): |
|
|
and (not self.app.pargs.site_name)): |
|
|
print(""" |
|
|
if self.app.pargs.stop or self.app.pargs.start: |
|
|
Usage: ee debug {<sitename>} {arguments} |
|
|
print("--start/stop option is deprecated in ee3.0.5", usage) |
|
|
arguments : |
|
|
else: |
|
|
--all [{on,off}] start/stop debugging all server parameters. |
|
|
print(usage) |
|
|
--nginx [{on,off}] start/stop debugging nginx server configuration for site |
|
|
|
|
|
--rewrite [{on,off}] start/stop debugging nginx rewrite rules for site |
|
|
|
|
|
--php [{on,off}] start/stop debugging server php configuration |
|
|
|
|
|
--fpm [{on,off}] start/stop debugging fastcgi configuration |
|
|
|
|
|
--mysql [{on,off}] start/stop debugging mysql server |
|
|
|
|
|
--wp [{on,off}] start/stop wordpress debugging |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Usage example: |
|
|
|
|
|
# This is global option will affect all sites |
|
|
|
|
|
# start debugging all server parameters |
|
|
|
|
|
|
|
|
|
|
|
ee debug --all / --all=on |
|
|
|
|
|
# stop debugging for all server parameters |
|
|
|
|
|
|
|
|
|
|
|
ee debug --all=off |
|
|
|
|
|
|
|
|
|
|
|
#This is site specific option will affect specific site mentioned |
|
|
|
|
|
# start debugging all server parameters for example.com |
|
|
|
|
|
|
|
|
|
|
|
ee debug example.com --all / --all=on |
|
|
|
|
|
|
|
|
|
|
|
# stop debugging for all server parameters available for example.com |
|
|
|
|
|
|
|
|
|
|
|
ee debug example.com --all=off |
|
|
|
|
|
""") |
|
|
|
|
|
|
|
|
|
|
|
if self.app.pargs.all == 'on': |
|
|
if self.app.pargs.all == 'on': |
|
|
if self.app.pargs.site_name: |
|
|
if self.app.pargs.site_name: |
|
@ -527,24 +529,7 @@ ee debug example.com --all=off |
|
|
and (not self.app.pargs.fpm) and (not self.app.pargs.mysql) |
|
|
and (not self.app.pargs.fpm) and (not self.app.pargs.mysql) |
|
|
and (not self.app.pargs.wp) and (not self.app.pargs.rewrite) |
|
|
and (not self.app.pargs.wp) and (not self.app.pargs.rewrite) |
|
|
and self.app.pargs.site_name): |
|
|
and self.app.pargs.site_name): |
|
|
print(""" |
|
|
print(usage) |
|
|
usage: ee debug <sitename> {arguments} |
|
|
|
|
|
arguments : |
|
|
|
|
|
--all [{on,off}] start/stop debugging all server parameters |
|
|
|
|
|
--nginx [{on,off}] start/stop debugging nginx server configuration for site |
|
|
|
|
|
--rewrite [{on,off}] start/stop debugging nginx rewrite rules for site |
|
|
|
|
|
--wp [{on,off}] start/stop wordpress debugging for site |
|
|
|
|
|
|
|
|
|
|
|
Usage example: |
|
|
|
|
|
#This is site specific option will affect specific site mentioned |
|
|
|
|
|
# start debugging all server parameters for example.com |
|
|
|
|
|
|
|
|
|
|
|
ee debug example.com --all / --all=on |
|
|
|
|
|
|
|
|
|
|
|
# stop debugging for all server parameters available for example.com |
|
|
|
|
|
|
|
|
|
|
|
ee debug example.com --all=off |
|
|
|
|
|
""") |
|
|
|
|
|
# self.app.pargs.nginx = 'on' |
|
|
# self.app.pargs.nginx = 'on' |
|
|
# self.app.pargs.wp = 'on' |
|
|
# self.app.pargs.wp = 'on' |
|
|
# self.app.pargs.rewrite = 'on' |
|
|
# self.app.pargs.rewrite = 'on' |
|
|