Initial commit
Build / run (push) Has been cancelled

This commit is contained in:
maher
2026-05-14 13:42:10 +02:00
commit 511fad8199
4595 changed files with 385164 additions and 0 deletions
+34
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;
}
}