#!/usr/local/bin/perl
# check.cgi
# Check if the firewall is valid
use strict;
use warnings;
our (%text, %config);
require './shorewall-lib.pl';
&ui_print_header(undef, $text{'check_title'}, "");
print "$text{'check_cmd'}
\n";
print "
";
open(STATUS, "$config{'shorewall'} check 2>&1 |");
while() {
print &html_escape($_);
}
close(STATUS);
print " \n";
if ($?) {
print "$text{'check_failed'}\n"; } else { print "$text{'check_ok'}
\n"; } &ui_print_footer("", $text{'index_return'});