--- loncom/debugging_tools/modify_config_files.pl 2021/03/13 19:38:32 1.18 +++ loncom/debugging_tools/modify_config_files.pl 2021/03/22 21:15:53 1.19 @@ -2,7 +2,7 @@ # # The LearningOnline Network # -# $Id: modify_config_files.pl,v 1.18 2021/03/13 19:38:32 raeburn Exp $ +# $Id: modify_config_files.pl,v 1.19 2021/03/22 21:15:53 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -244,8 +244,17 @@ if ($dist =~ /^fedora(\d+)$/) { } } +my $mysqlfile = '/etc/my.cnf'; +if ($dist =~ /^ubuntu(\d+)$/) { + my $version = $1; + $mysqlfile = '/etc/mysql/my.cnf'; + if ($version > 14) { + $mysqlfile = '/etc/mysql/mysql.conf.d/mysqld.cnf'; + } +} + my $mysql_global_status = - &update_file('/etc/my.cnf', + &update_file($mysqlfile, [{section =>'mysqld', key =>'wait_timeout=', value =>'31536000', }]);