@@ -103,7 +103,7 @@ def debug_nginx(self):
103103 self .trigger_nginx = True
104104
105105 else :
106- Log .info (self , "Nginx 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 , "Nginx 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
@@ -378,7 +378,7 @@ def debug_rewrite(self):
378378 .format (config_path ))
379379 self .trigger_nginx = True
380380 else :
381- Log .info (self , "Nginx rewrite logs for {0} allready setup"
381+ Log .info (self , "Nginx rewrite logs for {0} already setup"
382382 .format (self .app .pargs .site_name ))
383383
384384 if ('{0}{1}/logs/error.log' .format (EEVariables .ee_webroot ,
@@ -400,7 +400,7 @@ def debug_rewrite(self):
400400 .format (config_path ))
401401 self .trigger_nginx = True
402402 else :
403- Log .info (self , "Nginx rewrite logs for {0} allready "
403+ Log .info (self , "Nginx rewrite logs for {0} already "
404404 " disabled" .format (self .app .pargs .site_name ))
405405
406406 @expose (hide = True )
@@ -414,7 +414,12 @@ def signal_handler(self, signal, frame):
414414 if self .app .pargs .fpm :
415415 self .debug_fpm ()
416416 if self .app .pargs .mysql :
417- 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" )
418423 if self .app .pargs .wp :
419424 self .debug_wp ()
420425 if self .app .pargs .rewrite :
@@ -445,19 +450,19 @@ def default(self):
445450 and (not self .app .pargs .fpm ) and (not self .app .pargs .mysql )
446451 and (not self .app .pargs .wp ) and (not self .app .pargs .rewrite )
447452 and (not self .app .pargs .site_name )):
448- self .debug_nginx ()
449- self .debug_php ()
450- self .debug_fpm ()
451- self .debug_mysql ()
452- 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
453458
454459 if ((not self .app .pargs .nginx ) and (not self .app .pargs .php )
455460 and (not self .app .pargs .fpm ) and (not self .app .pargs .mysql )
456461 and (not self .app .pargs .wp ) and (not self .app .pargs .rewrite )
457462 and self .app .pargs .site_name ):
458- self .debug_nginx ()
459- self .debug_wp ()
460- self .debug_rewrite ()
463+ self .app . pargs . nginx = True
464+ self .app . pargs . wp = True
465+ self .app . pargs . rewrite = True
461466
462467 if self .app .pargs .nginx :
463468 self .debug_nginx ()
@@ -466,7 +471,12 @@ def default(self):
466471 if self .app .pargs .fpm :
467472 self .debug_fpm ()
468473 if self .app .pargs .mysql :
469- 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" )
470480 if self .app .pargs .wp :
471481 self .debug_wp ()
472482 if self .app .pargs .rewrite :
0 commit comments