mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-07 08:52:35 +00:00
refactoring (#116)
- refactoring architecture - fix incomplete ssh logs - code editor for scripts in the app - remove Jobs and SSHCommands
This commit is contained in:
@ -4,7 +4,6 @@
|
||||
|
||||
use App\Enums\ServerStatus;
|
||||
use App\Models\Server;
|
||||
use App\SSHCommands\System\RebootCommand;
|
||||
use Throwable;
|
||||
|
||||
class RebootServer
|
||||
@ -12,7 +11,7 @@ class RebootServer
|
||||
public function reboot(Server $server): Server
|
||||
{
|
||||
try {
|
||||
$server->ssh()->exec(new RebootCommand(), 'reboot');
|
||||
$server->os()->reboot();
|
||||
$server->status = ServerStatus::DISCONNECTED;
|
||||
$server->save();
|
||||
} catch (Throwable) {
|
||||
|
Reference in New Issue
Block a user