Subversion-Projekte lars-tiefland.openvz_admin

Revision

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

Revision 54 Revision 55
Zeile 151... Zeile 151...
151
			$dist=$d->toArray();
151
			$dist=$d->toArray();
152
			$i=new IP($v_ip);
152
			$i=new IP($v_ip);
153
			$ip=$i->toArray();
153
			$ip=$i->toArray();
154
			$d_name=$dist["dist_name"];
154
			$d_name=$dist["dist_name"];
155
			$this->dist=$d_name;
155
			$this->dist=$d_name;
156
			$d_template="/vz/template/cache/".$dist["template_name"].".tar.gz";
156
			$d_template="/vz/template/cache/".$dist["template"].".tar.gz";
157
			$db->beginTransaction();
157
			$db->beginTransaction();
158
			$sql="INSERT into vservers (v_id, hn_id, v_name, v_dist) VALUES ($this->v_id, $this->hn_id, '$this->name', $this->dist_id)";
158
			$sql="INSERT into vservers (v_id, hn_id, v_name, v_dist) VALUES ($this->v_id, $this->hn_id, '$this->name', $this->dist_id)";
159
			$res=$db->query($sql);
159
			$res=$db->query($sql);
160
			if(!PEAR::isError($res))
160
			if(!PEAR::isError($res))
161
			{
161
			{
162
				$cmd="ssh root@mainframe vzctl create $this->v_id --hostname $v_name --ostemplate $d_template --config vps.$d_name --ipadd ".$ip["ip"];
162
				$cmd="ssh root@mainframe vzctl create $this->v_id --hostname $v_name --ostemplate $d_template --config vps.$d_name --ipadd ".$ip[$v_ip];
163
				exec($cmd,$out,$ret);
163
				exec($cmd,$out,$ret);
164
				if(!$ret)
164
				if(!$ret)
165
				{
165
				{
166
					$smarty->assign("meld","vServer erfolgreich angelegt!");
166
					$smarty->assign("meld","vServer erfolgreich angelegt!");
167
					$smarty->assign("error", false);
167
					$smarty->assign("error", false);