All pastes #813442 Raw Edit

Untitled

public text v1 · immutable
·published 2007-12-12 15:19 UTC
rendered paste body
use strict;
use warnings;
use DBI;
use Net::Ping;

my $i = {
    'cfg'   => "./slave-stat.cfg"
};
## SLAVE:IP:VPNIP:GLPORT:SSHPORT
open (CFG, "<", "$i->{cfg}");
my $slave = <CFG>;


for $slave (<CFG>) {
    my ($sl_name, $sl_wanip, $sl_vpnip, $sl_glport) = split(":", $_);
    my $pingstatus = getping($sl_wanip);
}

sub get_ping {
  print $_;
}