mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-04-08 17:06:05 +02:00
asterisk: update xivo's script
This commit is contained in:
parent
eafb5b7e85
commit
676c10f6e0
@ -0,0 +1 @@
|
||||
<centreon asterisk user> <centreon asterisk secret>
|
@ -33,6 +33,7 @@
|
||||
#%# capabilities=autoconf
|
||||
|
||||
use strict;
|
||||
use File::Basename;
|
||||
|
||||
my $ret = undef;
|
||||
if (! eval "require Net::Telnet;")
|
||||
@ -40,6 +41,9 @@ if (! eval "require Net::Telnet;")
|
||||
$ret = "Net::Telnet not found";
|
||||
}
|
||||
|
||||
my $DIRNAME=dirname($0);
|
||||
my $conffile=$DIRNAME."/asterisk_centreon.conf";
|
||||
|
||||
my $command;
|
||||
if ( (defined($ARGV[0])) && ($ARGV[0] ne '') )
|
||||
{
|
||||
@ -60,7 +64,7 @@ my $port = exists $ENV{'port'} ? $ENV{'port'} : "5038";
|
||||
|
||||
my ($username, $secret);
|
||||
|
||||
open FILE, "asterisk-centreon.conf" or die $!;
|
||||
open FILE, $conffile or die $!;
|
||||
while (my $confline = <FILE>)
|
||||
{
|
||||
($username, $secret) = split(' ', $confline);
|
||||
|
Loading…
x
Reference in New Issue
Block a user