|
|
@ -150,7 +150,7 @@ class MariadbInstallCommand extends Command |
|
|
|
system('openssl rsa -in /etc/mysql/ssl/client-key.pem -out /etc/mysql/ssl/client-key.pem'); |
|
|
|
system('openssl x509 -req -in /etc/mysql/ssl/client-req.pem -days 365000 -CA /etc/mysql/ssl/ca-cert.pem -CAkey /etc/mysql/ssl/ca-key.pem -set_serial 01 -out /etc/mysql/ssl/client-cert.pem'); |
|
|
|
|
|
|
|
if (!file_exist('/etc/mysql/ssl/ca-cert.pem') || !file_exist('/etc/mysql/ssl/client-cert.pem') || file_exist('/etc/mysql/ssl/client-key.pem')) { |
|
|
|
if (!file_exists('/etc/mysql/ssl/ca-cert.pem') || !file_exists('/etc/mysql/ssl/client-cert.pem') || !file_exists('/etc/mysql/ssl/client-key.pem')) { |
|
|
|
$this->error('Failed! Certificates not created!'); |
|
|
|
exit(); |
|
|
|
} |
|
|
@ -175,7 +175,7 @@ ssl-key=/etc/mysql/ssl/client-key.pem'); |
|
|
|
system('chmod 644 /etc/mysql/ssl/*cert*'); |
|
|
|
system('chmod 644 /etc/mysql/ssl/*key*'); |
|
|
|
|
|
|
|
system('service restart mysql'); |
|
|
|
system('systemctl restart mariadb'); |
|
|
|
system('ufw allow mysql'); |
|
|
|
|
|
|
|
$this->info('Mariadb remote...Success! \o/'); |
|
|
|