@@ -103,7 +103,7 @@ def debug_nginx(self):
103103 self .trigger_nginx = True
104104
105105 else :
106- Log .info (self , "Debug for site allready enabled" )
106+ Log .info (self , "Nginx debug for site already enabled" )
107107
108108 self .msg = self .msg + ['{0}{1}/logs/error.log'
109109 .format (EEVariables .ee_webroot ,
@@ -129,7 +129,7 @@ def debug_nginx(self):
129129
130130 else :
131131
132- Log .info (self , "Debug for site allready disabled" )
132+ Log .info (self , "Nginx debug for site already disabled" )
133133 else :
134134 Log .info (self , "{0} domain not valid"
135135 .format (self .app .pargs .site_name ))
@@ -154,7 +154,7 @@ def debug_php(self):
154154 self .trigger_php = True
155155 self .trigger_nginx = True
156156 else :
157- Log .info (self , "PHP debug is allready enabled" )
157+ Log .info (self , "PHP debug is already enabled" )
158158
159159 self .msg = self .msg + ['/var/log/php5/slow.log' ]
160160
@@ -174,7 +174,7 @@ def debug_php(self):
174174 self .trigger_php = True
175175 self .trigger_nginx = True
176176 else :
177- Log .info (self , "PHP debug is allready disabled" )
177+ Log .info (self , "PHP debug is already disabled" )
178178
179179 @expose (hide = True )
180180 def debug_fpm (self ):
@@ -249,7 +249,7 @@ def debug_mysql(self):
249249 "n#EasyEngine end MySQL slow log\\ \" ;"
250250 " }} | crontab -\" " .format (cron_time ))
251251 else :
252- Log .info (self , "MySQL slow log is allready enabled" )
252+ Log .info (self , "MySQL slow log is already enabled" )
253253
254254 self .msg = self .msg + ['/var/log/mysql/mysql-slow.log' ]
255255
@@ -273,7 +273,7 @@ def debug_mysql(self):
273273 def debug_wp (self ):
274274 """Start/Stop WordPress debug"""
275275 if self .start and self .app .pargs .site_name :
276- wp_config = ("{0}{1}/wp-config.php"
276+ wp_config = ("{0}/ {1}/wp-config.php"
277277 .format (EEVariables .ee_webroot ,
278278 self .app .pargs .site_name ))
279279 webroot = "{0}{1}" .format (EEVariables .ee_webroot ,
@@ -301,8 +301,6 @@ def debug_wp(self):
301301 "wp-content/plugins"
302302 .format (webroot ,
303303 EEVariables .ee_php_user ))
304- else :
305- Log .info (self , "WordPress debug log already enabled" )
306304
307305 self .msg = self .msg + ['{0}{1}/htdocs/wp-content'
308306 '/debug.log'
@@ -337,9 +335,6 @@ def debug_wp(self):
337335 "true);/d\" {0}" .format (wp_config ))
338336 else :
339337 Log .info (self , "WordPress debug all already disabled" )
340- else :
341- Log .error (self , "{0} domain not valid"
342- .format (self .app .pargs .site_name ))
343338 else :
344339 Log .error (self , "Missing argument site name" )
345340
@@ -383,7 +378,7 @@ def debug_rewrite(self):
383378 .format (config_path ))
384379 self .trigger_nginx = True
385380 else :
386- Log .info (self , "Nginx rewrite logs for {0} allready setup"
381+ Log .info (self , "Nginx rewrite logs for {0} already setup"
387382 .format (self .app .pargs .site_name ))
388383
389384 if ('{0}{1}/logs/error.log' .format (EEVariables .ee_webroot ,
@@ -405,7 +400,7 @@ def debug_rewrite(self):
405400 .format (config_path ))
406401 self .trigger_nginx = True
407402 else :
408- Log .info (self , "Nginx rewrite logs for {0} allready "
403+ Log .info (self , "Nginx rewrite logs for {0} already "
409404 " disabled" .format (self .app .pargs .site_name ))
410405
411406 @expose (hide = True )
@@ -419,7 +414,12 @@ def signal_handler(self, signal, frame):
419414 if self .app .pargs .fpm :
420415 self .debug_fpm ()
421416 if self .app .pargs .mysql :
422- self .debug_mysql ()
417+ # MySQL debug will not work for remote MySQL
418+ if EEVariables .ee_mysql_host is "localhost" :
419+ self .debug_mysql ()
420+ else :
421+ Log .warn (self , "Remote MySQL found, EasyEngine will not "
422+ "enable remote debug" )
423423 if self .app .pargs .wp :
424424 self .debug_wp ()
425425 if self .app .pargs .rewrite :
@@ -450,19 +450,19 @@ def default(self):
450450 and (not self .app .pargs .fpm ) and (not self .app .pargs .mysql )
451451 and (not self .app .pargs .wp ) and (not self .app .pargs .rewrite )
452452 and (not self .app .pargs .site_name )):
453- self .debug_nginx ()
454- self .debug_php ()
455- self .debug_fpm ()
456- self .debug_mysql ()
457- self .debug_rewrite ()
453+ self .app . pargs . nginx = True
454+ self .app . pargs . php = True
455+ self .app . pargs . fpm = True
456+ self .app . pargs . mysql = True
457+ self .app . pargs . rewrite = True
458458
459459 if ((not self .app .pargs .nginx ) and (not self .app .pargs .php )
460460 and (not self .app .pargs .fpm ) and (not self .app .pargs .mysql )
461461 and (not self .app .pargs .wp ) and (not self .app .pargs .rewrite )
462462 and self .app .pargs .site_name ):
463- self .debug_nginx ()
464- self .debug_wp ()
465- self .debug_rewrite ()
463+ self .app . pargs . nginx = True
464+ self .app . pargs . wp = True
465+ self .app . pargs . rewrite = True
466466
467467 if self .app .pargs .nginx :
468468 self .debug_nginx ()
@@ -471,7 +471,12 @@ def default(self):
471471 if self .app .pargs .fpm :
472472 self .debug_fpm ()
473473 if self .app .pargs .mysql :
474- self .debug_mysql ()
474+ # MySQL debug will not work for remote MySQL
475+ if EEVariables .ee_mysql_host is "localhost" :
476+ self .debug_mysql ()
477+ else :
478+ Log .warn (self , "Remote MySQL found, EasyEngine will not "
479+ "enable remote debug" )
475480 if self .app .pargs .wp :
476481 self .debug_wp ()
477482 if self .app .pargs .rewrite :
0 commit comments