|
@ -86,11 +86,12 @@ class EEDebugController(CementBaseController): |
|
|
config_path = ("/etc/nginx/sites-available/{0}" |
|
|
config_path = ("/etc/nginx/sites-available/{0}" |
|
|
.format(self.app.pargs.site_name)) |
|
|
.format(self.app.pargs.site_name)) |
|
|
if os.path.isfile(config_path): |
|
|
if os.path.isfile(config_path): |
|
|
if not EEShellExec.cmd_exec("grep \"error.log debug\" {0}" |
|
|
if not EEShellExec.cmd_exec(self, "grep \"error.log debug\" " |
|
|
.format(config_path)): |
|
|
"{0}".format(config_path)): |
|
|
Log.info(self, "Starting NGINX debug connection for " |
|
|
Log.info(self, "Starting NGINX debug connection for " |
|
|
"{0}".format(self.app.pargs.site_name)) |
|
|
"{0}".format(self.app.pargs.site_name)) |
|
|
EEShellExec.cmd_exec("sed -i \"s/error.log;/error.log " |
|
|
EEShellExec.cmd_exec(self, "sed -i \"s/error.log;/" |
|
|
|
|
|
"error.log " |
|
|
"debug;/\" {0}".format(config_path)) |
|
|
"debug;/\" {0}".format(config_path)) |
|
|
self.trigger_nginx = True |
|
|
self.trigger_nginx = True |
|
|
|
|
|
|
|
@ -109,11 +110,11 @@ class EEDebugController(CementBaseController): |
|
|
config_path = ("/etc/nginx/sites-available/{0}" |
|
|
config_path = ("/etc/nginx/sites-available/{0}" |
|
|
.format(self.app.pargs.site_name)) |
|
|
.format(self.app.pargs.site_name)) |
|
|
if os.path.isfile(config_path): |
|
|
if os.path.isfile(config_path): |
|
|
if EEShellExec.cmd_exec("grep \"error.log debug\" {0}" |
|
|
if EEShellExec.cmd_exec(self, "grep \"error.log debug\" {0}" |
|
|
.format(config_path)): |
|
|
.format(config_path)): |
|
|
Log.info(self, "Stoping NGINX debug connection for {0}" |
|
|
Log.info(self, "Stoping NGINX debug connection for {0}" |
|
|
.format(self.app.pargs.site_name)) |
|
|
.format(self.app.pargs.site_name)) |
|
|
EEShellExec.cmd_exec("sed -i \"s/error.log debug;/" |
|
|
EEShellExec.cmd_exec(self, "sed -i \"s/error.log debug;/" |
|
|
"error.log;/\" {0}" |
|
|
"error.log;/\" {0}" |
|
|
.format(config_path)) |
|
|
.format(config_path)) |
|
|
self.trigger_nginx = True |
|
|
self.trigger_nginx = True |
|
@ -286,7 +287,7 @@ class EEDebugController(CementBaseController): |
|
|
EEShellExec.cmd_exec(self, "sed -i \"/define(\'" |
|
|
EEShellExec.cmd_exec(self, "sed -i \"/define(\'" |
|
|
"WP_DEBUG_LOG\', true);/d\" {0}" |
|
|
"WP_DEBUG_LOG\', true);/d\" {0}" |
|
|
.format(wp_config)) |
|
|
.format(wp_config)) |
|
|
EEShellExec.cmd_exec("sed -i \"/define(\'" |
|
|
EEShellExec.cmd_exec(self, "sed -i \"/define(\'" |
|
|
"SAVEQUERIES\', " |
|
|
"SAVEQUERIES\', " |
|
|
"true);/d\" {0}".format(wp_config)) |
|
|
"true);/d\" {0}".format(wp_config)) |
|
|
else: |
|
|
else: |
|
|