diff --git a/app/Actions/Proxy/CheckProxySettingsInSync.php b/app/Actions/Proxy/CheckProxySettingsInSync.php index 98225d414..0a63a0735 100644 --- a/app/Actions/Proxy/CheckProxySettingsInSync.php +++ b/app/Actions/Proxy/CheckProxySettingsInSync.php @@ -17,8 +17,17 @@ public function __invoke(Server $server) ProxyTypes::TRAEFIK_V2->value => 'proxy', }; - return instantRemoteProcess([ + $container_name = 'coolify-proxy'; + + $output = instantRemoteProcess([ 'if [ -d "projects/'.$folder_name.'" ]; then echo "true"; else echo "false"; fi', + <</dev/null)" == "true" ]] && echo "true" || echo "false" + EOT, ], $server); + + return collect( + explode(PHP_EOL, $output) + )->every(fn($output) => $output === 'true'); } } diff --git a/app/Http/Livewire/Server/Proxy.php b/app/Http/Livewire/Server/Proxy.php index 40fe2e4cc..16e92cf48 100644 --- a/app/Http/Livewire/Server/Proxy.php +++ b/app/Http/Livewire/Server/Proxy.php @@ -33,9 +33,9 @@ public function runInstallProxy() public function checkProxySettingsInSync() { - $status = resolve(CheckProxySettingsInSync::class)($this->server); + $this->is_proxy_settings_in_sync = resolve(CheckProxySettingsInSync::class)($this->server); + $this->is_check_proxy_complete = true; - $this->is_proxy_settings_in_sync = $status === 'true'; } public function render()