Re-added the errors logs when load enterprise file in server.

This commit is contained in:
mdtrooper 2015-07-07 16:28:48 +02:00
parent a57e6b4a59
commit fc04efc82f
1 changed files with 12 additions and 4 deletions

View File

@ -581,16 +581,24 @@ sub enterprise_load ($) {
if ($^O eq 'MSWin32') {
# If the Windows service dies the service is stopped, even inside an eval ($RUN is set to 0)!
eval 'local $SIG{__DIE__}; require PandoraFMS::Enterprise;';
} else {
}
else {
eval 'require PandoraFMS::Enterprise;';
}
# Ops
return 0 if ($@);
if ($@) {
open (STDERR, ">> " . $pa_config->{'errorlogfile'});
print STDERR $@;
close (STDERR);
return 0;
}
# Initialize the enterprise module.
PandoraFMS::Enterprise::init($pa_config);
return 1;
}