updated include file
This commit is contained in:
parent
05429bf5ec
commit
031641f9d0
|
@ -1,11 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include_once(dirname(__FILE__) . '/vm.php');
|
include_once(dirname(__FILE__) . '/vm.class.php');
|
||||||
# include('vm.php'); // This one fails ...
|
# include('vm.php'); // This one fails ...
|
||||||
|
|
||||||
class m_lxc implements vm
|
class m_lxc implements vm
|
||||||
{
|
{
|
||||||
// TODO Paramétrer IP / Port
|
|
||||||
public $IP;
|
public $IP;
|
||||||
public $PORT;
|
public $PORT;
|
||||||
public $TIMEOUT = 5;
|
public $TIMEOUT = 5;
|
||||||
|
@ -72,13 +71,20 @@ class m_lxc implements vm
|
||||||
|
|
||||||
public function start($login = FALSE, $pass = FALSE, $uid = FALSE)
|
public function start($login = FALSE, $pass = FALSE, $uid = FALSE)
|
||||||
{
|
{
|
||||||
$res = $this->sendMessage('start', 'fser', 'pass', 42);
|
global $mem;
|
||||||
|
|
||||||
|
$user = $login ? $login : $mem->user['login'];
|
||||||
|
$pass = $pass ? $pass : $mem->user['pass'];
|
||||||
|
$uid = $uid ? $uid : $mem->user['uid'];
|
||||||
|
|
||||||
|
$res = $this->sendMessage('start', $user, $pass, $uid);
|
||||||
if ($res === FALSE)
|
if ($res === FALSE)
|
||||||
return $this->error[0];
|
return $this->error[0];
|
||||||
else
|
else
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function monit()
|
public function monit()
|
||||||
{
|
{
|
||||||
echo "1 / 5 used";
|
echo "1 / 5 used";
|
||||||
|
|
Loading…
Reference in New Issue