Files
webmin/minecraft/output.cgi
Jamie Cameron 24b004d8f3 show more lines
2013-04-12 13:28:03 -07:00

20 lines
379 B
Perl
Executable File

#!/usr/local/bin/perl
# Tail the console log
use strict;
use warnings;
require './minecraft-lib.pl';
our (%config);
my $logfile = $config{'minecraft_dir'}."/server.log";
$| = 1;
&popup_header();
my $fh = "OUT";
&open_execute_command($fh, "tail -40f ".$logfile, 1, 1);
select($fh); $| = 1; select(STDOUT);
print "<pre>\n";
while(<$fh>) {
print &html_escape($_);
}
close($fh);