Subversion-Projekte lars-tiefland.openvz_admin

Revision

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

Revision 113 Revision 114
Zeile 1... Zeile 1...
1
<?php
1
<?php
2
	//$Id: load.php 113 2008-05-22 13:28:18Z lars $
2
	//$Id: load.php 114 2008-05-22 13:35:39Z 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");
8
	$hns = HN::getHNs();
8
	$hns = HN::getHNs();
9
	unset($hns[-1]);
9
	unset($hns[-1]);
10
	#	$hns[3]="gate.dynalias.net";
10
	#	$hns[3]="gate.dynalias.net";
11
	foreach ($hns as $hn_id => $hn_name)
11
	foreach ($hns as $hn_id => $hn_name)
12
	{
12
	{
-
 
13
		$configs=load_configs($hn_id,$hn_name);
-
 
14
		foreach($configs as $conf_id => $config)
-
 
15
		{
-
 
16
			var_dump($configs);
-
 
17
			$cfg=read_config($hn_id,$config);
-
 
18
		}
-
 
19
	}
-
 
20
	
-
 
21
	function load_configs($hn_id,$hn_name)
-
 
22
	{
13
		unset($files, $out, $cont, $cont_f);
23
		unset($files, $out, $cont, $cont_f);
14
		$cmd = "ssh root@$hn_name ls /etc/vz/conf/*.conf";
24
		$cmd = "ssh root@$hn_name ls /etc/vz/conf/*.conf";
15
		exec($cmd, $out, $ret);
25
		exec($cmd, $out, $ret);
16
		$files = $out;
26
		return $out;
-
 
27
	}
-
 
28
	
-
 
29
	function read_config($hn_id, $config)
-
 
30
	{
-
 
31
		
-
 
32
	}
17
		foreach ($files as $conf)
33
/*		foreach ($files as $conf)
18
		{
34
		{
19
			unset($cont);
35
			unset($cont);
20
			$conf = basename($conf);
36
			$conf = basename($conf);
21
			unset($out);
37
			unset($out);
22
			$cmd = "scp root@$hn_name:/etc/vz/conf/$conf cfgs/$hn_id";
38
			$cmd = "scp root@$hn_name:/etc/vz/conf/$conf cfgs/$hn_id";
Zeile 114... Zeile 130...
114
						echo $res->getUserInfo();
130
						echo $res->getUserInfo();
115
					}
131
					}
116
				}
132
				}
117
			}
133
			}
118
		}
134
		}
119
	}
135
	}*/
120
?>
136
?>