Subversion-Projekte lars-tiefland.openvz_admin

Revision

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

Revision 128 Revision 129
Zeile 1... Zeile 1...
1
<?php
1
<?php
2
	//$Id: load.php 128 2008-05-22 15:24:14Z lars $
2
	//$Id: load.php 129 2008-05-22 15:26:26Z lars $
3
	/**
3
	/**
4
	 * 	@package	openvz_admin
4
	 * 	@package	openvz_admin
5
	 * 	@author		Lars Tiefland <ltiefland@gmail.com> 
5
	 * 	@author		Lars Tiefland <ltiefland@gmail.com> 
6
	 **/
6
	 **/
7
	require ("include/common.php");
7
	require ("include/common.php");
Zeile 26... Zeile 26...
26
		return $out;
26
		return $out;
27
	}
27
	}
Zeile 28... Zeile 28...
28
 
28
 
29
	function read_config($hn_id, $hn_name, $config)
29
	function read_config($hn_id, $hn_name, $config)
30
	{
30
	{
31
		$conf = basename($config);
31
		$config = basename($config);
32
		$cmd = "scp root@$hn_name:/etc/vz/conf/$conf cfgs/$hn_id";
32
		$cmd = "scp root@$hn_name:/etc/vz/conf/$config cfgs/$hn_id";
33
		exec($cmd, $out, $ret);
33
		exec($cmd, $out, $ret);
34
		$conf = file("cfgs/$hn_id/$conf");
34
		$conf = file("cfgs/$hn_id/$conf");
35
		$conf[] = "v_id=\"" . substr($conf, 0, strpos($conf, '.')) . "\"";
35
		$conf[] = "v_id=\"" . substr($config, 0, strpos($config, '.')) . "\"";
36
		foreach ($conf as $value)
36
		foreach ($conf as $value)
37
		{
37
		{
38
			if ($value)
38
			if ($value)
39
			{
39
			{