@@ -194,28 +194,28 @@ def debug_php(self):
194194 nc .savef ('/etc/nginx/conf.d/upstream.conf' )
195195
196196 # Enable xdebug
197- EEFileUtils .searchreplace (self , "/etc/{0}/mods-available/" .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' ) else "php5" ) +
197+ EEFileUtils .searchreplace (self , "/etc/{0}/mods-available/" .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' or EEVariables . ee_platform_codename == 'bionic' ) else "php5" ) +
198198 "xdebug.ini" ,
199199 ";zend_extension" ,
200200 "zend_extension" )
201201
202202 # Fix slow log is not enabled default in PHP5.6
203203 config = configparser .ConfigParser ()
204- config .read ('/etc/{0}/fpm/pool.d/debug.conf' .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' ) else "php5" ))
205- config ['debug' ]['slowlog' ] = '/var/log/{0}/slow.log' .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' ) else "php5" )
204+ config .read ('/etc/{0}/fpm/pool.d/debug.conf' .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' or EEVariables . ee_platform_codename == 'bionic' ) else "php5" ))
205+ config ['debug' ]['slowlog' ] = '/var/log/{0}/slow.log' .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' or EEVariables . ee_platform_codename == 'bionic' ) else "php5" )
206206 config ['debug' ]['request_slowlog_timeout' ] = '10s'
207- with open ('/etc/{0}/fpm/pool.d/debug.conf' .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' ) else "php5" ),
207+ with open ('/etc/{0}/fpm/pool.d/debug.conf' .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' or EEVariables . ee_platform_codename == 'bionic' ) else "php5" ),
208208 encoding = 'utf-8' , mode = 'w' ) as confifile :
209209 Log .debug (self , "Writting debug.conf configuration into "
210- "/etc/{0}/fpm/pool.d/debug.conf" .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' ) else "php5" ))
210+ "/etc/{0}/fpm/pool.d/debug.conf" .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' or EEVariables . ee_platform_codename == 'bionic' ) else "php5" ))
211211 config .write (confifile )
212212
213213 self .trigger_php = True
214214 self .trigger_nginx = True
215215 else :
216216 Log .info (self , "PHP debug is already enabled" )
217217
218- self .msg = self .msg + ['/var/log/{0}/slow.log' .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' ) else "php5" )]
218+ self .msg = self .msg + ['/var/log/{0}/slow.log' .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' or EEVariables . ee_platform_codename == 'bionic' ) else "php5" )]
219219
220220 # PHP global debug stop
221221 elif (self .app .pargs .php == 'off' and not self .app .pargs .site_name ):
@@ -233,7 +233,7 @@ def debug_php(self):
233233 nc .savef ('/etc/nginx/conf.d/upstream.conf' )
234234
235235 # Disable xdebug
236- EEFileUtils .searchreplace (self , "/etc/{0}/mods-available/" .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' ) else "php5" ) +
236+ EEFileUtils .searchreplace (self , "/etc/{0}/mods-available/" .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' or EEVariables . ee_platform_codename == 'bionic' ) else "php5" ) +
237237 "xdebug.ini" ,
238238 "zend_extension" ,
239239 ";zend_extension" )
@@ -249,38 +249,38 @@ def debug_fpm(self):
249249 # PHP5-FPM start global debug
250250 if (self .app .pargs .fpm == 'on' and not self .app .pargs .site_name ):
251251 if not EEShellExec .cmd_exec (self , "grep \" log_level = debug\" "
252- "/etc/{0}/fpm/php-fpm.conf" .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' ) else "php5" )):
252+ "/etc/{0}/fpm/php-fpm.conf" .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' or EEVariables . ee_platform_codename == 'bionic' ) else "php5" )):
253253 Log .info (self , "Setting up PHP5-FPM log_level = debug" )
254254 config = configparser .ConfigParser ()
255- config .read ('/etc/{0}/fpm/php-fpm.conf' .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' ) else "php5" ))
255+ config .read ('/etc/{0}/fpm/php-fpm.conf' .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' or EEVariables . ee_platform_codename == 'bionic' ) else "php5" ))
256256 config .remove_option ('global' , 'include' )
257257 config ['global' ]['log_level' ] = 'debug'
258- config ['global' ]['include' ] = '/etc/{0}/fpm/pool.d/*.conf' .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' ) else "php5" )
259- with open ('/etc/{0}/fpm/php-fpm.conf' .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' ) else "php5" ),
258+ config ['global' ]['include' ] = '/etc/{0}/fpm/pool.d/*.conf' .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' or EEVariables . ee_platform_codename == 'bionic' ) else "php5" )
259+ with open ('/etc/{0}/fpm/php-fpm.conf' .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' or EEVariables . ee_platform_codename == 'bionic' ) else "php5" ),
260260 encoding = 'utf-8' , mode = 'w' ) as configfile :
261261 Log .debug (self , "Writting php5-FPM configuration into "
262- "/etc/{0}/fpm/php-fpm.conf" .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' ) else "php5" ))
262+ "/etc/{0}/fpm/php-fpm.conf" .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' or EEVariables . ee_platform_codename == 'bionic' ) else "php5" ))
263263 config .write (configfile )
264264 self .trigger_php = True
265265 else :
266266 Log .info (self , "PHP5-FPM log_level = debug already setup" )
267267
268- self .msg = self .msg + ['/var/log/{0}/fpm.log' .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' ) else "php5" )]
268+ self .msg = self .msg + ['/var/log/{0}/fpm.log' .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' or EEVariables . ee_platform_codename == 'bionic' ) else "php5" )]
269269
270270 # PHP5-FPM stop global debug
271271 elif (self .app .pargs .fpm == 'off' and not self .app .pargs .site_name ):
272272 if EEShellExec .cmd_exec (self , "grep \" log_level = debug\" "
273- "/etc/{0}/fpm/php-fpm.conf" .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' ) else "php5" )):
273+ "/etc/{0}/fpm/php-fpm.conf" .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' or EEVariables . ee_platform_codename == 'bionic' ) else "php5" )):
274274 Log .info (self , "Disabling PHP5-FPM log_level = debug" )
275275 config = configparser .ConfigParser ()
276- config .read ('/etc/{0}/fpm/php-fpm.conf' .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' ) else "php5" ))
276+ config .read ('/etc/{0}/fpm/php-fpm.conf' .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' or EEVariables . ee_platform_codename == 'bionic' ) else "php5" ))
277277 config .remove_option ('global' , 'include' )
278278 config ['global' ]['log_level' ] = 'notice'
279- config ['global' ]['include' ] = '/etc/{0}/fpm/pool.d/*.conf' .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' ) else "php5" )
280- with open ('/etc/{0}/fpm/php-fpm.conf' .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' ) else "php5" ),
279+ config ['global' ]['include' ] = '/etc/{0}/fpm/pool.d/*.conf' .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' or EEVariables . ee_platform_codename == 'bionic' ) else "php5" )
280+ with open ('/etc/{0}/fpm/php-fpm.conf' .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' or EEVariables . ee_platform_codename == 'bionic' ) else "php5" ),
281281 encoding = 'utf-8' , mode = 'w' ) as configfile :
282282 Log .debug (self , "writting php5 configuration into "
283- "/etc/{0}/fpm/php-fpm.conf" .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' ) else "php5" ))
283+ "/etc/{0}/fpm/php-fpm.conf" .format ("php/5.6" if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' or EEVariables . ee_platform_codename == 'bionic' ) else "php5" ))
284284 config .write (configfile )
285285
286286 self .trigger_php = True
@@ -626,7 +626,7 @@ def signal_handler(self, signal, frame):
626626
627627 # Reload PHP
628628 if self .trigger_php :
629- if EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' :
629+ if EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' or EEVariables . ee_platform_codename == 'bionic' :
630630 if EEAptGet .is_installed (self ,'php5.6-fpm' ):
631631 EEService .reload_service (self , 'php5.6-fpm' )
632632 if EEAptGet .is_installed (self ,'php7.0-fpm' ):
@@ -717,7 +717,7 @@ def default(self):
717717 self .app .pargs .nginx = 'on'
718718 self .app .pargs .php = 'on'
719719 self .app .pargs .fpm = 'on'
720- if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' ) and EEAptGet .is_installed (self ,'php7.0-fpm' ):
720+ if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' or EEVariables . ee_platform_codename == 'bionic' ) and EEAptGet .is_installed (self ,'php7.0-fpm' ):
721721 self .app .pargs .php7 = 'on'
722722 self .app .pargs .fpm7 = 'on'
723723 self .app .pargs .mysql = 'on'
@@ -729,7 +729,7 @@ def default(self):
729729 self .app .pargs .nginx = 'off'
730730 self .app .pargs .php = 'off'
731731 self .app .pargs .fpm = 'off'
732- if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' ) and EEAptGet .is_installed (self ,'php7.0-fpm' ):
732+ if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' or EEVariables . ee_platform_codename == 'bionic' ) and EEAptGet .is_installed (self ,'php7.0-fpm' ):
733733 self .app .pargs .php7 = 'off'
734734 self .app .pargs .fpm7 = 'off'
735735 self .app .pargs .mysql = 'off'
@@ -774,7 +774,7 @@ def default(self):
774774 EEService .reload_service (self , 'nginx' )
775775 # Reload PHP
776776 if self .trigger_php :
777- if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' ):
777+ if (EEVariables .ee_platform_codename == 'trusty' or EEVariables .ee_platform_codename == 'xenial' or EEVariables . ee_platform_codename == 'bionic' ):
778778 if EEAptGet .is_installed (self ,'php5.6-fpm' ):
779779 EEService .restart_service (self , 'php5.6-fpm' )
780780 if EEAptGet .is_installed (self ,'php7.0-fpm' ):
0 commit comments