Fixes to the Windows service.

git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10230 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
pandora-release 2014-06-18 09:57:17 +00:00
parent 68da06d3fe
commit c9d5e8d794
2 changed files with 7 additions and 3 deletions

View File

@ -350,7 +350,7 @@ sub win32_install_service() {
# Configure and install the service.
my $service_path = $0;
my $service_params = "-S run \"$ARGV[0]\"";
my $service_params = "-S run \"" . $Config{'pandora_path'} ."\"";
my %service_hash = (
machine => '',
name => 'PANDORAFMSSRV',

View File

@ -494,8 +494,12 @@ sub enterprise_load ($) {
#return 1 if (is_loaded ('PandoraFMS::Enterprise'));
# Try to load the module
# eval 'local $SIG{__DIE__}; require PandoraFMS::Enterprise;';
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 {
eval 'require PandoraFMS::Enterprise;';
}
# Ops
return 0 if ($@);