2.x - firewall/metrics/services/cronjobs

This commit is contained in:
Saeed Vaziry
2024-10-01 19:09:38 +02:00
parent 2e9620409b
commit 906ddc38de
58 changed files with 1625 additions and 631 deletions

View File

@ -5,6 +5,7 @@
use App\Exceptions\SSHAuthenticationError;
use App\Exceptions\SSHCommandError;
use App\Exceptions\SSHConnectionError;
use App\Exceptions\SSHError;
use App\Models\Server;
use App\Models\ServerLog;
use Exception;
@ -88,8 +89,7 @@ public function connect(bool $sftp = false): void
}
/**
* @throws SSHCommandError
* @throws SSHConnectionError
* @throws SSHError
*/
public function exec(string $command, string $log = '', ?int $siteId = null, ?bool $stream = false): string
{
@ -136,7 +136,6 @@ public function exec(string $command, string $log = '', ?int $siteId = null, ?bo
return $output;
}
} catch (Throwable $e) {
throw $e;
throw new SSHCommandError($e->getMessage());
}
}