From 990d60926e2aa090d6cb9907c12980033db6a505 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Thu, 29 Mar 2018 08:47:55 -0400 Subject: [PATCH] #92 new key --- .../ZoneMinder/lib/ZoneMinder/ConfigData.pm.in | 17 ++++++++++++++++- scripts/zmdc.pl.in | 5 +++++ scripts/zmpkg.pl.in | 5 +++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in index 6df8a9927..9d8d83577 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in +++ b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in @@ -375,7 +375,22 @@ our @options = ( type => $types{boolean}, category => 'system', }, - # PP - Google reCaptcha settings + { + name => 'ZM_OPT_USE_EVENTNOTIFICATION', + default => 'no', + description => 'Enable 3rd party Event Notification Server', + help => q` + zmeventnotification is a 3rd party event notification server + that is used to get notifications for alarms detected by ZoneMinder + in real time. zmNinja requires this server for push notifications to + mobile phones. This option only enables the server if its already installed. + Please visit https://github.com/pliablepixels/zmeventserver for installation + instructions. + `, + type => $types{boolean}, + category => 'system', + }, + # Google reCaptcha settings { name => 'ZM_OPT_USE_GOOG_RECAPTCHA', default => 'no', diff --git a/scripts/zmdc.pl.in b/scripts/zmdc.pl.in index 33cfde9f7..ddfda1d6d 100644 --- a/scripts/zmdc.pl.in +++ b/scripts/zmdc.pl.in @@ -99,6 +99,11 @@ my @daemons = ( 'zmtelemetry.pl' ); +if ($Config{ZM_OPT_USE_ZMEVENTNOTIFICATION}) +{ + push @daemons,'zmeventnotification.pl'; +} + my $command = shift @ARGV; if( !$command ) { diff --git a/scripts/zmpkg.pl.in b/scripts/zmpkg.pl.in index bc57430f4..75a9129a4 100644 --- a/scripts/zmpkg.pl.in +++ b/scripts/zmpkg.pl.in @@ -225,6 +225,7 @@ if ( $command =~ /^(?:start|restart)$/ ) { # This is now started unconditionally runCommand('zmdc.pl start zmfilter.pl'); + if ( $Config{ZM_RUN_AUDIT} ) { runCommand('zmdc.pl start zmaudit.pl -c'); } @@ -241,6 +242,10 @@ if ( $command =~ /^(?:start|restart)$/ ) { if ( $Config{ZM_TELEMETRY_DATA} ) { runCommand('zmdc.pl start zmtelemetry.pl'); } + if ($Config{ZM_OPT_USE_ZMEVENTNOTIFICATION} ) + { + runCommand('zmdc.pl start zmeventnotification.pl'); + } } else { $retval = 1; }