diff --git a/app/Actions/Database/StartKeydb.php b/app/Actions/Database/StartKeydb.php index 863691e1e..58f3cda4e 100644 --- a/app/Actions/Database/StartKeydb.php +++ b/app/Actions/Database/StartKeydb.php @@ -5,7 +5,6 @@ use App\Helpers\SslHelper; use App\Models\SslCertificate; use App\Models\StandaloneKeydb; -use Illuminate\Support\Facades\Storage; use Lorisleiva\Actions\Concerns\AsAction; use Symfony\Component\Yaml\Yaml; @@ -270,10 +269,9 @@ private function add_custom_keydb() return; } $filename = 'keydb.conf'; - Storage::disk('local')->put("tmp/keydb.conf_{$this->database->uuid}", $this->database->keydb_conf); - $path = Storage::path("tmp/keydb.conf_{$this->database->uuid}"); - instant_scp($path, "{$this->configuration_dir}/{$filename}", $this->database->destination->server); - Storage::disk('local')->delete("tmp/keydb.conf_{$this->database->uuid}"); + $content = $this->database->keydb_conf; + $content_base64 = base64_encode($content); + $this->commands[] = "echo '{$content_base64}' | base64 -d | tee $this->configuration_dir/{$filename} > /dev/null"; } private function buildStartCommand(): string diff --git a/app/Actions/Database/StartRedis.php b/app/Actions/Database/StartRedis.php index 2eaf82fdd..4e4f3ce53 100644 --- a/app/Actions/Database/StartRedis.php +++ b/app/Actions/Database/StartRedis.php @@ -5,7 +5,6 @@ use App\Helpers\SslHelper; use App\Models\SslCertificate; use App\Models\StandaloneRedis; -use Illuminate\Support\Facades\Storage; use Lorisleiva\Actions\Concerns\AsAction; use Symfony\Component\Yaml\Yaml; @@ -316,9 +315,8 @@ private function add_custom_redis() return; } $filename = 'redis.conf'; - Storage::disk('local')->put("tmp/redis.conf_{$this->database->uuid}", $this->database->redis_conf); - $path = Storage::path("tmp/redis.conf_{$this->database->uuid}"); - instant_scp($path, "{$this->configuration_dir}/{$filename}", $this->database->destination->server); - Storage::disk('local')->delete("tmp/redis.conf_{$this->database->uuid}"); + $content = $this->database->redis_conf; + $content_base64 = base64_encode($content); + $this->commands[] = "echo '{$content_base64}' | base64 -d | tee $this->configuration_dir/{$filename} > /dev/null"; } }