2009-09-18 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/configurar_agente.php: add the feature to delete remote conf file in the agent configuration. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1979 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
7318361ebf
commit
d598b6b9a0
|
@ -1,3 +1,8 @@
|
|||
2009-09-18 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* godmode/agentes/configurar_agente.php: add the feature to delete remote
|
||||
conf file in the agent configuration.
|
||||
|
||||
2009-09-18 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_db.php: fix the delete the conf and md5 files of agent
|
||||
|
|
|
@ -230,6 +230,30 @@ if ($id_agente) {
|
|||
echo '<div style="height: 25px;"> </div>';
|
||||
}
|
||||
|
||||
$delete_conf_file = (bool) get_parameter('delete_conf_file');
|
||||
|
||||
if ($delete_conf_file) {
|
||||
$correct = false;
|
||||
// Delete remote configuration
|
||||
if (isset ($config["remote_config"])) {
|
||||
$agent_md5 = md5 (get_agent_name ($id_agente,'none'), FALSE);
|
||||
|
||||
if (file_exists ($config["remote_config"]."/md5/".$agent_md5.".md5")) {
|
||||
// Agent remote configuration editor
|
||||
$file_name = $config["remote_config"]."/conf/".$agent_md5.".conf";
|
||||
$correct = @unlink ($file_name);
|
||||
|
||||
$file_name = $config["remote_config"]."/md5/".$agent_md5.".md5";
|
||||
$correct = @unlink ($file_name);
|
||||
}
|
||||
}
|
||||
|
||||
print_result_message ($correct,
|
||||
__('Successfully delete conf file'),
|
||||
__('Could not be delete conf file'));
|
||||
}
|
||||
|
||||
|
||||
// Show agent creation results
|
||||
if ($create_agent) {
|
||||
print_result_message ($agent_created_ok,
|
||||
|
|
Loading…
Reference in New Issue