version 1.18, 2021/03/13 19:38:32
|
version 1.20, 2021/03/25 13:23:07
|
Line 244 if ($dist =~ /^fedora(\d+)$/) {
|
Line 244 if ($dist =~ /^fedora(\d+)$/) {
|
} |
} |
} |
} |
|
|
my $mysql_global_status = |
my $mysqlfile = '/etc/my.cnf'; |
&update_file('/etc/my.cnf', |
my $mysqlconf = [{section =>'mysqld', |
[{section =>'mysqld', |
key =>'wait_timeout=', |
key =>'wait_timeout=', |
value =>'31536000'}]; |
value =>'31536000', }]); |
if ($dist =~ /^ubuntu(\d+)$/) { |
|
my $version = $1; |
|
$mysqlfile = '/etc/mysql/my.cnf'; |
|
if ($version > 14) { |
|
$mysqlfile = '/etc/mysql/mysql.conf.d/mysqld.cnf'; |
|
if ($version < 20) { |
|
push(@{$mysqlconf}, |
|
{section =>'mysqld', |
|
key =>'sql_mode=', |
|
value =>'"STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"'}); |
|
} else { |
|
push(@{$mysqlconf}, |
|
{section =>'mysqld', |
|
key =>'sql_mode=', |
|
value =>'"STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"'}); |
|
} |
|
} |
|
} |
|
|
|
my $mysql_global_status = &update_file($mysqlfile,$mysqlconf); |
|
|
my $local_my_cnf = '/home/www/.my.cnf'; |
my $local_my_cnf = '/home/www/.my.cnf'; |
if (! -e $local_my_cnf) { |
if (! -e $local_my_cnf) { |