- removing deprecated legacy_cron entry from database

- minor changes for multiserver-support
This commit is contained in:
Michael Kaufmann (d00p)
2010-10-18 09:48:26 +00:00
parent 699f451234
commit 3a9813c1b5
5 changed files with 59 additions and 30 deletions

View File

@@ -107,26 +107,41 @@ class froxlorclient
public function Deploy()
{
// get FroxlorSshTransport-object
if($this->_getSetting('client', 'deploy_mode') !== null
&& $this->_getSetting('client', 'deploy_mode') == 'pubkey'
) {
$ssh = FroxlorSshTransport::usePublicKey(
$this->_getSetting('client', 'hostname'),
$this->_getSetting('client', 'ssh_port'),
$this->_getSetting('client', 'ssh_user'),
$this->_getSetting('client', 'ssh_pubkey'),
$this->_getSetting('client', 'ssh_privkey'),
$this->_getSetting('client', 'ssh_passphrase')
);
} else if($this->_getSetting('client', 'deploy_mode') !== null) {
$ssh = FroxlorSshTransport::usePlainPassword(
$this->_getSetting('client', 'hostname'),
$this->_getSetting('client', 'ssh_port'),
$this->_getSetting('client', 'ssh_user'),
$this->_getSetting('client', 'ssh_passphrase')
);
} else {
throw new Exception('NO_DEPLOY_METHOD_GIVEN');
$ssh = null;
try {
if($this->_getSetting('client', 'deploy_mode') !== null
&& $this->_getSetting('client', 'deploy_mode') == 'pubkey'
) {
$ssh = FroxlorSshTransport::usePublicKey(
$this->_getSetting('client', 'hostname'),
$this->_getSetting('client', 'ssh_port'),
$this->_getSetting('client', 'ssh_user'),
$this->_getSetting('client', 'ssh_pubkey'),
$this->_getSetting('client', 'ssh_privkey'),
$this->_getSetting('client', 'ssh_passphrase')
);
} else if($this->_getSetting('client', 'deploy_mode') !== null) {
$ssh = FroxlorSshTransport::usePlainPassword(
$this->_getSetting('client', 'hostname'),
$this->_getSetting('client', 'ssh_port'),
$this->_getSetting('client', 'ssh_user'),
$this->_getSetting('client', 'ssh_passphrase')
);
} else {
throw new Exception('NO_DEPLOY_METHOD_GIVEN');
}
} catch (Exception $e) {
return $e->getMessage();
}
if($ssh instanceof FroxlorSshTransport)
{
/**
* @TODO implement me
*/
// close the session
$ssh->close();
}
}
@@ -353,6 +368,10 @@ class froxlorclient
{
$this->Set($field, $value, true, true);
}
// after we have details about the client,
// we need its settings too
$this->_readSettings();
}
}
}

View File

@@ -309,4 +309,4 @@ class FroxlorSshTransport
}
}
}
?>

View File

@@ -72,7 +72,7 @@ define('PACKAGE_ENABLED', 2);
// VERSION INFO
$version = '0.9.14-svn7';
$version = '0.9.14-svn8';
$dbversion = '2';
$branding = '';