fix: sentinel config changes restarts sentinel

This commit is contained in:
Andras Bacsai
2024-10-22 14:10:36 +02:00
parent ac768e5313
commit 1f221d9791
5 changed files with 30 additions and 9 deletions

View File

@@ -3,6 +3,7 @@
namespace App\Models;
use App\Actions\Server\InstallDocker;
use App\Actions\Server\StartSentinel;
use App\Enums\ProxyTypes;
use App\Jobs\PullSentinelImageJob;
use Illuminate\Database\Eloquent\Builder;
@@ -1265,4 +1266,13 @@ $schema://$host {
{
return str($this->ip)->contains(':');
}
public function restartSentinel()
{
try {
StartSentinel::dispatch($this,true);
} catch (\Throwable $e) {
loggy('Error restarting Sentinel: '.$e->getMessage());
}
}
}