diff --git a/src/warden-client/bin/sender.pl b/src/warden-client/bin/sender.pl index cf9d6253f7868a9bc556155319bd6a175ac055be..9c586217d974b11685b93514086bdc8536915942 100755 --- a/src/warden-client/bin/sender.pl +++ b/src/warden-client/bin/sender.pl @@ -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++) {