From 14b364baecff14d417fac3106f797369e0ca1540 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Wed, 31 Mar 2021 12:37:02 +0200 Subject: [PATCH] Fixed issue with execution without correct params --- pandora_server/lib/PandoraFMS/Config.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index c7c80bdcd1..51c6a2d9d2 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -117,9 +117,9 @@ sub pandora_init { ($pa_config->{"pandora_path"} = $parametro); } } - if ($pa_config->{"pandora_path"} eq ""){ - print " [ERROR] I need at least one parameter: Complete path to " . pandora_get_initial_product_name() . " configuration file. \n"; - print " For example: ./pandora_server /etc/pandora/pandora_server.conf \n\n"; + if (!defined ($pa_config->{"pandora_path"}) || $pa_config->{"pandora_path"} eq ""){ + print "[ERROR] I need at least one parameter: Complete path to " . pandora_get_initial_product_name() . " configuration file. \n"; + print "For example: ./pandora_server /etc/pandora/pandora_server.conf \n\n"; exit; } }