mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 05:56:16 +00:00
@ -30,6 +30,19 @@ public function upgrade(): void
|
||||
);
|
||||
}
|
||||
|
||||
public function availableUpdates(): int
|
||||
{
|
||||
$result = $this->server->ssh()->exec(
|
||||
$this->getScript('available-updates.sh'),
|
||||
'check-available-updates'
|
||||
);
|
||||
|
||||
// -1 because the first line is not a package
|
||||
$availableUpdates = str($result)->after('Available updates:')->trim()->toInteger() - 1;
|
||||
|
||||
return max($availableUpdates, 0);
|
||||
}
|
||||
|
||||
public function createUser(string $user, string $password, string $key): void
|
||||
{
|
||||
$this->server->ssh()->exec(
|
||||
|
Reference in New Issue
Block a user