#!/usr/bin/perl
#-------------------------------------------------------------#
# This script is the client piece for the nagios telephone    #
# alert system.  It connects to the call server and requests  #
# a phone call, then exits without wiating for any            #
# confirmation.                                               #
#-------------------------------------------------------------#
use IO::Socket;

#connect to the unix domain socket
$client = IO::Socket::UNIX->new(Peer      => "/tmp/mysock",
                                Type      => SOCK_STREAM,
                                Timeout   => 10 )
    or die $@;

print $client "call";

#close the socket
close ($client);
