#! /usr/bin/perl

# #################################################################
#
# Web HylaFAX gateway 1.0                          December 1998
# Nic Tjirkalli (nic@uunet.co.za, http://duffus.iafrica.com/~nic)
#
# #################################################################



require("cgilib.pl");
require("fax-gw-config.pl");

# Set perl not to buffer ouptput
        $| = 1;


# Static variables
	$filestat = "/tmp/.fax.status.$$";

# Initialise  variables 

&pagetop;
&output;
$command = $statprog." -d";

system("$command 1>$filestat 2>$filestat");

open(RESULT, "$cat $filestat |");
while($line=<RESULT>) {
print $line
}
close(RESULT);

print "</PRE>";
system("$rm $filestatus 1>/dev/null 2>/dev/null");



&bottom;



############################################
sub output	{
{ print <<EOF
<H1>HylaFAX Server Status</H1>
<BR><P>
<HR SIZE="2" NOSHADE>
<BR><P>
<PRE>
EOF
}
}



