Subversion-Projekte lars-tiefland.openvz_admin

Revision

Revision 76 | Revision 83 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 76 Revision 82
Zeile 1... Zeile 1...
1
<?php
1
<?php
2
	//$Id: vServer.class.php 76 2008-01-24 19:58:21Z lars $
2
	//$Id: vServer.class.php 82 2008-02-16 22:30:56Z lars $
3
	class vServer
3
	class vServer
4
	{
4
	{
5
	 	protected $status;
5
	 	protected $status;
6
	 	protected $name;
6
	 	protected $name;
7
	 	protected $hn_id;
7
	 	protected $hn_id;
Zeile 41... Zeile 41...
41
				$this->status["status"]="";
41
				$this->status["status"]="";
42
				$this->status["code"]="0";
42
				$this->status["code"]="0";
43
			}
43
			}
44
		}
44
		}
Zeile 45... Zeile 45...
45
		
45
		
46
		function getStatus()
46
		function getStatus($hn_id)
47
		{
47
		{
48
			if(!$this->status)
48
			if(!$this->status)
Zeile 49... Zeile 49...
49
			{
49
			{
50
 
50
 
51
				unset($out);
51
				unset($out);
52
				if($this->v_id!=0)
52
				if($this->v_id!=0)
-
 
53
				{
53
				{
54
					$id=$this->v_id;
54
					$id=$this->v_id;
55
					$hn=HN::getHN($hn_id);
55
					$cmd="ssh root@mainframe vzctl status $id";
56
					$cmd="ssh root@".$hn["name"]." vzctl status $id";
56
					exec($cmd,$out,$ret);
57
					exec($cmd,$out,$ret);
57
					if(!$ret)
58
					if(!$ret)
58
					{
59
					{