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;
use warnings;
use DateTime;
use File::Basename;
#-------------------------------------------------------------------------------
# Warden 2.2. Client, Sender, Example
......@@ -46,11 +47,10 @@ my @event = ($service, $detected, $type, $source_type, $source,
# This code should developer add to his/her detection application
# (with corresponding paths appropriately changed).
# Path to warden-client folder
my $warden_path = '/opt/warden-client';
# Inclusion of warden-client sender module
require $warden_path . '/lib/WardenClient.pm';
# load Warden client library and main module
my $bin = File::Basename::dirname(__FILE__);
use lib "$bin/../lib";
use WardenClient;
# Sending event to Warden server
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