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

View File

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