Skip to content
Snippets Groups Projects
Commit 199fc4ed authored by Tomáš Plesník's avatar Tomáš Plesník
Browse files

pridano nacitani adresare lib a modulu WardenClient.pm pomoci promenne __FILE__

parent f1f7e783
No related branches found
No related tags found
No related merge requests found
...@@ -8,6 +8,7 @@ use strict; ...@@ -8,6 +8,7 @@ use strict;
use warnings; use warnings;
use DateTime; use DateTime;
use File::Basename;
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Warden 2.2. Client, Sender, Example # Warden 2.2. Client, Sender, Example
...@@ -46,11 +47,10 @@ my @event = ($service, $detected, $type, $source_type, $source, ...@@ -46,11 +47,10 @@ my @event = ($service, $detected, $type, $source_type, $source,
# This code should developer add to his/her detection application # This code should developer add to his/her detection application
# (with corresponding paths appropriately changed). # (with corresponding paths appropriately changed).
# Path to warden-client folder # load Warden client library and main module
my $warden_path = '/opt/warden-client'; my $bin = File::Basename::dirname(__FILE__);
use lib "$bin/../lib";
# Inclusion of warden-client sender module use WardenClient;
require $warden_path . '/lib/WardenClient.pm';
# Sending event to Warden server # Sending event to Warden server
for (my $i = 0; $i < 10; $i++) { for (my $i = 0; $i < 10; $i++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment