Subversion-Projekte lars-tiefland.openvz_admin

Revision

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

Revision 116 Revision 117
Zeile 1... Zeile 1...
1
<?php
1
<?php
2
	//$Id: load.php 116 2008-05-22 13:39:56Z lars $
2
	//$Id: load.php 117 2008-05-22 13:40:47Z 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 11... Zeile 11...
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);
13
		$configs=load_configs($hn_id,$hn_name);
14
		foreach($configs as $conf_id => $config)
14
		foreach($configs as $conf_id => $config)
15
		{
15
		{
16
			$cfg=read_config($hn_id,$config);
16
			$cfg=read_config($hn_name,$config);
17
			var_dump($cfg);
17
			var_dump($cfg);
18
		}
18
		}
19
	}
19
	}
Zeile 20... Zeile 20...
20
	
20
	
21
	function load_configs($hn_id,$hn_name)
21
	function load_configs($hn_name,$hn_name)
22
	{
22
	{
23
		unset($out);
23
		unset($out);
24
		$cmd = "ssh root@$hn_name ls /etc/vz/conf/*.conf";
24
		$cmd = "ssh root@$hn_name ls /etc/vz/conf/*.conf";
25
		exec($cmd, $out, $ret);
25
		exec($cmd, $out, $ret);