From d2b6b098a32bf48845b41f86e4bb2dfe775b05ab Mon Sep 17 00:00:00 2001 From: daniel Date: Wed, 29 Nov 2023 11:38:19 +0100 Subject: [PATCH] fix inventory pandora_enterprise#12188 --- pandora_server/lib/PandoraFMS/InventoryServer.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/InventoryServer.pm b/pandora_server/lib/PandoraFMS/InventoryServer.pm index 515d875788..e6b070f4d8 100644 --- a/pandora_server/lib/PandoraFMS/InventoryServer.pm +++ b/pandora_server/lib/PandoraFMS/InventoryServer.pm @@ -181,15 +181,12 @@ sub data_consumer ($$) { AND tagent_module_inventory.id_module_inventory = tmodule_inventory.id_module_inventory', $module_id); - # No code to run - return if ($module->{'interpreter'} eq ''); - my $command; my ($fh, $temp_file) = tempfile(); if ($module->{'script_mode'} == '1') { my $script_file = $module->{'script_path'}; - $command = $module->{'interpreter'} . ' ' . $script_file; + $command = $module->{'interpreter'} . ' ' . $script_file . ' "' . $module->{'target'} . '"'; } else { # Save script in a temporary file $fh->print (decode_base64($module->{'code'}));