fix: server disabled

This commit is contained in:
Andras Bacsai
2024-02-26 14:22:24 +01:00
parent bf1475441d
commit af3c575d84
6 changed files with 81 additions and 56 deletions

View File

@@ -110,6 +110,9 @@ function instant_scp(string $source, string $dest, Server $server, $throwError =
}
function generateSshCommand(Server $server, string $command)
{
if ($server->settings->force_disabled) {
throw new \RuntimeException('Server is disabled.');
}
$user = $server->user;
$port = $server->port;
$privateKeyLocation = savePrivateKeyToFs($server);