Merge pull request #93 from pliablepixels/92-opt-eventnotification
92 opt eventnotification
This commit is contained in:
commit
ce1499d70f
|
@ -400,7 +400,22 @@ our @options = (
|
||||||
type => $types{boolean},
|
type => $types{boolean},
|
||||||
category => 'system',
|
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',
|
name => 'ZM_OPT_USE_GOOG_RECAPTCHA',
|
||||||
default => 'no',
|
default => 'no',
|
||||||
|
@ -424,7 +439,6 @@ our @options = (
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name => 'ZM_OPT_GOOG_RECAPTCHA_SITEKEY',
|
name => 'ZM_OPT_GOOG_RECAPTCHA_SITEKEY',
|
||||||
default => '...Insert your recaptcha site-key here...',
|
|
||||||
description => 'Your recaptcha site-key',
|
description => 'Your recaptcha site-key',
|
||||||
help => q`You need to generate your keys from
|
help => q`You need to generate your keys from
|
||||||
the Google reCaptcha website.
|
the Google reCaptcha website.
|
||||||
|
|
|
@ -104,6 +104,10 @@ my @daemons = (
|
||||||
'zmtelemetry.pl'
|
'zmtelemetry.pl'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if ($Config{ZM_OPT_USE_EVENTNOTIFICATION}) {
|
||||||
|
push @daemons,'zmeventnotification.pl';
|
||||||
|
}
|
||||||
|
|
||||||
my $command = shift @ARGV;
|
my $command = shift @ARGV;
|
||||||
if( ! $command ) {
|
if( ! $command ) {
|
||||||
print( STDERR "No command given\n" );
|
print( STDERR "No command given\n" );
|
||||||
|
|
|
@ -232,6 +232,7 @@ if ( $command =~ /^(?:start|restart)$/ ) {
|
||||||
|
|
||||||
# This is now started unconditionally
|
# This is now started unconditionally
|
||||||
runCommand('zmdc.pl start zmfilter.pl');
|
runCommand('zmdc.pl start zmfilter.pl');
|
||||||
|
|
||||||
if ( $Config{ZM_RUN_AUDIT} ) {
|
if ( $Config{ZM_RUN_AUDIT} ) {
|
||||||
if ( $Server and exists $$Server{'zmaudit'} and ! $$Server{'zmaudit'} ) {
|
if ( $Server and exists $$Server{'zmaudit'} and ! $$Server{'zmaudit'} ) {
|
||||||
Debug("Not running zmaudit.pl because it is turned off for this server.");
|
Debug("Not running zmaudit.pl because it is turned off for this server.");
|
||||||
|
@ -256,6 +257,9 @@ if ( $command =~ /^(?:start|restart)$/ ) {
|
||||||
if ( $Config{ZM_TELEMETRY_DATA} ) {
|
if ( $Config{ZM_TELEMETRY_DATA} ) {
|
||||||
runCommand('zmdc.pl start zmtelemetry.pl');
|
runCommand('zmdc.pl start zmtelemetry.pl');
|
||||||
}
|
}
|
||||||
|
if ($Config{ZM_OPT_USE_EVENTNOTIFICATION} ) {
|
||||||
|
runCommand('zmdc.pl start zmeventnotification.pl');
|
||||||
|
}
|
||||||
if ( $Server and exists $$Server{'zmstats'} and ! $$Server{'zmstats'} ) {
|
if ( $Server and exists $$Server{'zmstats'} and ! $$Server{'zmstats'} ) {
|
||||||
Debug("Not running zmstats.pl because it is turned off for this server.");
|
Debug("Not running zmstats.pl because it is turned off for this server.");
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue