Subversion-Projekte lars-tiefland.openvz_admin

Revision

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

Revision 114 Revision 115
Zeile 1... Zeile 1...
1
<?php
1
<?php
2
	//$Id: load.php 114 2008-05-22 13:35:39Z lars $
2
	//$Id: load.php 115 2008-05-22 13:38:04Z 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
			var_dump($configs);
16
			var_dump($config);
17
			$cfg=read_config($hn_id,$config);
17
			$cfg=read_config($hn_id,$config);
18
		}
18
		}
19
	}
19
	}
Zeile 20... Zeile 20...
20
	
20
	
21
	function load_configs($hn_id,$hn_name)
21
	function load_configs($hn_id,$hn_name)
22
	{
22
	{
23
		unset($files, $out, $cont, $cont_f);
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);
26
		return $out;
26
		return $out;