fix(ssl): do not remove SSL directory

This commit is contained in:
peaklabs-dev
2025-02-05 18:03:55 +01:00
parent e81ed1aad8
commit a3c4f86e80
3 changed files with 1 additions and 4 deletions

View File

@@ -56,7 +56,6 @@ class StartMariadb
});
} else {
$this->commands[] = "echo 'Setting up SSL for this database.'";
$this->commands[] = "rm -rf $this->configuration_dir/ssl";
$this->commands[] = "mkdir -p $this->configuration_dir/ssl";
$server = $this->database->destination->server;
$caCert = SslCertificate::where('server_id', $server->id)->firstOrFail();
@@ -188,7 +187,7 @@ class StartMariadb
$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml up -d";
$this->commands[] = "echo 'Database started.'";
if ($this->database->enable_ssl) {
$this->commands[] = executeInDocker($this->database->uuid, 'chown mariadb:mariadb /etc/mysql/certs/server.crt /etc/mysql/certs/server.key');
$this->commands[] = executeInDocker($this->database->uuid, "chown {$this->database->mariadb_user}:{$this->database->mariadb_user} /etc/mysql/certs/server.crt /etc/mysql/certs/server.key");
}
return remote_process($this->commands, $database->destination->server, callEventOnFinish: 'DatabaseStatusChanged');

View File

@@ -56,7 +56,6 @@ class StartMysql
});
} else {
$this->commands[] = "echo 'Setting up SSL for this database.'";
$this->commands[] = "rm -rf $this->configuration_dir/ssl";
$this->commands[] = "mkdir -p $this->configuration_dir/ssl";
$server = $this->database->destination->server;
$caCert = SslCertificate::where('server_id', $server->id)->firstOrFail();

View File

@@ -61,7 +61,6 @@ class StartPostgresql
});
} else {
$this->commands[] = "echo 'Setting up SSL for this database.'";
$this->commands[] = "rm -rf $this->configuration_dir/ssl";
$this->commands[] = "mkdir -p $this->configuration_dir/ssl";
$server = $this->database->destination->server;