From 990d60926e2aa090d6cb9907c12980033db6a505 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Thu, 29 Mar 2018 08:47:55 -0400 Subject: [PATCH 1/3] #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; } From d64e58e3740b7ef706a64f4c237b02effb646ca1 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Thu, 29 Mar 2018 11:23:35 -0400 Subject: [PATCH 2/3] silly mistake - wrong names --- scripts/zmdc.pl.in | 2 +- scripts/zmpkg.pl.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/zmdc.pl.in b/scripts/zmdc.pl.in index ffa8ad25e..b579c6b0c 100644 --- a/scripts/zmdc.pl.in +++ b/scripts/zmdc.pl.in @@ -104,7 +104,7 @@ my @daemons = ( 'zmtelemetry.pl' ); -if ($Config{ZM_OPT_USE_ZMEVENTNOTIFICATION}) +if ($Config{ZM_OPT_USE_EVENTNOTIFICATION}) { push @daemons,'zmeventnotification.pl'; } diff --git a/scripts/zmpkg.pl.in b/scripts/zmpkg.pl.in index 5cabcf5ba..a898e0164 100644 --- a/scripts/zmpkg.pl.in +++ b/scripts/zmpkg.pl.in @@ -257,7 +257,7 @@ if ( $command =~ /^(?:start|restart)$/ ) { if ( $Config{ZM_TELEMETRY_DATA} ) { runCommand('zmdc.pl start zmtelemetry.pl'); } - if ($Config{ZM_OPT_USE_ZMEVENTNOTIFICATION} ) + if ($Config{ZM_OPT_USE_EVENTNOTIFICATION} ) { runCommand('zmdc.pl start zmeventnotification.pl'); } From e5505de1d1be1d734ca496b7d47340e9cb064272 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Thu, 29 Mar 2018 11:27:31 -0400 Subject: [PATCH 3/3] fixed brace styling --- scripts/zmdc.pl.in | 3 +-- scripts/zmpkg.pl.in | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/zmdc.pl.in b/scripts/zmdc.pl.in index b579c6b0c..18ae27844 100644 --- a/scripts/zmdc.pl.in +++ b/scripts/zmdc.pl.in @@ -104,8 +104,7 @@ my @daemons = ( 'zmtelemetry.pl' ); -if ($Config{ZM_OPT_USE_EVENTNOTIFICATION}) -{ +if ($Config{ZM_OPT_USE_EVENTNOTIFICATION}) { push @daemons,'zmeventnotification.pl'; } diff --git a/scripts/zmpkg.pl.in b/scripts/zmpkg.pl.in index a898e0164..d772c9944 100644 --- a/scripts/zmpkg.pl.in +++ b/scripts/zmpkg.pl.in @@ -257,8 +257,7 @@ if ( $command =~ /^(?:start|restart)$/ ) { if ( $Config{ZM_TELEMETRY_DATA} ) { runCommand('zmdc.pl start zmtelemetry.pl'); } - if ($Config{ZM_OPT_USE_EVENTNOTIFICATION} ) - { + if ($Config{ZM_OPT_USE_EVENTNOTIFICATION} ) { runCommand('zmdc.pl start zmeventnotification.pl'); } if ( $Server and exists $$Server{'zmstats'} and ! $$Server{'zmstats'} ) {