first commit
Some checks failed
Build / run (push) Has been cancelled

This commit is contained in:
maher
2025-10-29 11:42:25 +01:00
commit 703f50a09d
4595 changed files with 385164 additions and 0 deletions

34
common/SSR/StopSsr.php Executable file
View File

@@ -0,0 +1,34 @@
<?php
namespace Common\SSR;
use Illuminate\Console\Command;
class StopSsr extends Command
{
protected $name = 'ssr:stop';
protected $description = 'Stop the SSR server';
public function handle(): int
{
$serverUrl = config('common.site.ssr_url') . '/shutdown';
$ch = curl_init($serverUrl);
curl_exec($ch);
if (
curl_error($ch) !== '' &&
curl_error($ch) !== 'Empty reply from server'
) {
$this->error('Unable to connect to SSR server.');
return self::FAILURE;
}
$this->info('SSR server stopped.');
curl_close($ch);
return self::SUCCESS;
}
}