mirror of
https://github.com/hauke68/Magallanes.git
synced 2026-09-09 14:58:57 +02:00
[Nostromo] Allow to 'sudo' remote commands
This commit is contained in:
@@ -392,10 +392,16 @@ class Runtime
|
||||
public function runRemoteCommand($cmd, $jail = true, $timeout = 120)
|
||||
{
|
||||
$user = $this->getEnvironmentConfig('user');
|
||||
$sudo = $this->getEnvironmentConfig('sudo', false);
|
||||
$host = $this->getWorkingHost();
|
||||
$sshConfig = $this->getSSHConfig();
|
||||
|
||||
$cmdDelegate = $cmd;
|
||||
if ($sudo === true) {
|
||||
$cmdDelegate = sprintf('sudo %s', $cmd);
|
||||
} else {
|
||||
$cmdDelegate = $cmd;
|
||||
}
|
||||
|
||||
if ($jail) {
|
||||
$hostPath = rtrim($this->getEnvironmentConfig('host_path'), '/');
|
||||
if ($this->getReleaseId()) {
|
||||
|
||||
Reference in New Issue
Block a user