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:
parent
68da06d3fe
commit
c9d5e8d794
|
@ -350,7 +350,7 @@ sub win32_install_service() {
|
||||||
|
|
||||||
# Configure and install the service.
|
# Configure and install the service.
|
||||||
my $service_path = $0;
|
my $service_path = $0;
|
||||||
my $service_params = "-S run \"$ARGV[0]\"";
|
my $service_params = "-S run \"" . $Config{'pandora_path'} ."\"";
|
||||||
my %service_hash = (
|
my %service_hash = (
|
||||||
machine => '',
|
machine => '',
|
||||||
name => 'PANDORAFMSSRV',
|
name => 'PANDORAFMSSRV',
|
||||||
|
|
|
@ -494,8 +494,12 @@ sub enterprise_load ($) {
|
||||||
#return 1 if (is_loaded ('PandoraFMS::Enterprise'));
|
#return 1 if (is_loaded ('PandoraFMS::Enterprise'));
|
||||||
|
|
||||||
# Try to load the module
|
# 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;';
|
eval 'require PandoraFMS::Enterprise;';
|
||||||
|
}
|
||||||
|
|
||||||
# Ops
|
# Ops
|
||||||
return 0 if ($@);
|
return 0 if ($@);
|
||||||
|
|
Loading…
Reference in New Issue