From 99e794a97b6c1a1bfe0789ff11daac6ec773a6e3 Mon Sep 17 00:00:00 2001 From: "Jan M. Hochstein" Date: Thu, 7 Aug 2014 18:06:22 +0200 Subject: [PATCH] Removed hard coded binary path and perl binary location --- onvif/scripts/zmonvif-probe.pl | 4 +++- web/skins/classic/views/onvifprobe.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) mode change 100644 => 100755 onvif/scripts/zmonvif-probe.pl diff --git a/onvif/scripts/zmonvif-probe.pl b/onvif/scripts/zmonvif-probe.pl old mode 100644 new mode 100755 index 031c7071b..500aa91b0 --- a/onvif/scripts/zmonvif-probe.pl +++ b/onvif/scripts/zmonvif-probe.pl @@ -1,3 +1,5 @@ +#!/usr/bin/perl -w +# # ========================================================================== # # ZoneMinder ONVIF Control Protocol Module @@ -138,7 +140,7 @@ sub metadata die $result if not $result; print $result . "\n"; - my $result = $client->get_endpoint('media')->GetVideoAnalyticsConfigurations( { } ,, ); + $result = $client->get_endpoint('media')->GetVideoAnalyticsConfigurations( { } ,, ); die $result if not $result; print $result . "\n"; diff --git a/web/skins/classic/views/onvifprobe.php b/web/skins/classic/views/onvifprobe.php index 075d22f24..4644d226f 100644 --- a/web/skins/classic/views/onvifprobe.php +++ b/web/skins/classic/views/onvifprobe.php @@ -30,7 +30,7 @@ $cameras[0] = $SLANG['ChooseDetectedCamera']; function execONVIF( $cmd ) { - exec( escapeshellcmd("/usr/bin/perl /usr/local/bin/zmonvif-probe.pl $cmd"), $output, $status ); + exec( escapeshellcmd(ZM_PATH_BIN . "/zmonvif-probe.pl $cmd"), $output, $status ); if ( $status ) Fatal( "Unable to probe network cameras, status is '$status'" );