commit
8b44c6d732
|
@ -33,7 +33,7 @@ use Getopt::Long;
|
||||||
use POSIX qw/strftime EPIPE/;
|
use POSIX qw/strftime EPIPE/;
|
||||||
use Socket;
|
use Socket;
|
||||||
#use Data::Dumper;
|
#use Data::Dumper;
|
||||||
use Module::Load;
|
use Module::Load::Conditional qw{can_load};;
|
||||||
|
|
||||||
use constant MAX_CONNECT_DELAY => 10;
|
use constant MAX_CONNECT_DELAY => 10;
|
||||||
use constant MAX_COMMAND_WAIT => 1800;
|
use constant MAX_COMMAND_WAIT => 1800;
|
||||||
|
@ -129,6 +129,10 @@ if ( !$server_up )
|
||||||
Info( "Starting control server $id/$protocol" );
|
Info( "Starting control server $id/$protocol" );
|
||||||
close( CLIENT );
|
close( CLIENT );
|
||||||
|
|
||||||
|
if ( ! can_load( modules => { "ZoneMinder::Control::$protocol" => undef } ) ) {
|
||||||
|
Fatal("Can't load ZoneMinder::Control::$protocol");
|
||||||
|
}
|
||||||
|
|
||||||
if ( my $cpid = fork() )
|
if ( my $cpid = fork() )
|
||||||
{
|
{
|
||||||
logReinit();
|
logReinit();
|
||||||
|
@ -156,8 +160,6 @@ if ( !$server_up )
|
||||||
|
|
||||||
$0 = $0." --id $id";
|
$0 = $0." --id $id";
|
||||||
|
|
||||||
load "ZoneMinder::Control::$protocol";
|
|
||||||
|
|
||||||
my $control = "ZoneMinder::Control::$protocol"->new( $id );
|
my $control = "ZoneMinder::Control::$protocol"->new( $id );
|
||||||
my $control_key = $control->getKey();
|
my $control_key = $control->getKey();
|
||||||
$control->loadMonitor();
|
$control->loadMonitor();
|
||||||
|
|
Loading…
Reference in New Issue