ansible-ffibk/roles/service-fastd/files/fastd-status

18 lines
308 B
Plaintext
Raw Normal View History

#!/usr/bin/perl -w
use strict;
use IO::Socket::UNIX qw( SOCK_STREAM );
$ARGV[0] or die("Usage: fastd-status <socket>\n");
my $socket = IO::Socket::UNIX->new(
Type => SOCK_STREAM,
Peer => $ARGV[0],
)
or die("Can't connect to server: $!\n");
foreach my $line (<$socket>) {
print $line;
}