Subversion-Projekte lars-tiefland.openvz_admin

Revision

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

Revision 105 Revision 106
Zeile 1... Zeile 1...
1
<?php
1
<?php
2
	//$Id: vServer.class.php 105 2008-03-16 12:58:50Z lars $
2
	//$Id: vServer.class.php 106 2008-03-16 12:59:55Z 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 170... Zeile 170...
170
				$sql="SELECT ip FROM ips WHERE ip='".$ip["ip"]."'";
170
				$sql="SELECT ip FROM ips WHERE ip='".$ip["ip"]."'";
171
				$res=$db->query($sql);
171
				$res=$db->query($sql);
172
				if(!PEAR::isError($res))
172
				if(!PEAR::isError($res))
173
				{
173
				{
174
					$row=$res->fetchRow();
174
					$row=$res->fetchRow();
175
					$ip_id=$row["ip"];
175
					$ip_id=$row["id"];
176
					$sql="INSERT INTO host_2_ip (ve_id, ip) VALUES (".$v_id.",'".$ip_id."')";
176
					$sql="INSERT INTO host_2_ip (ve_id, ip) VALUES (".$v_id.",'".$ip_id."')";
177
					$res=$db->query($sql);
177
					$res=$db->query($sql);
178
					if(!PEAR::isError($res))
178
					if(!PEAR::isError($res))
179
					{
179
					{
180
						$cmd="ssh root@mainframe vzctl create $this->v_id --hostname $v_name --ostemplate $d_template --config vps.$d_name --ipadd ".$ip["ip"];
180
						$cmd="ssh root@mainframe vzctl create $this->v_id --hostname $v_name --ostemplate $d_template --config vps.$d_name --ipadd ".$ip["ip"];