Handle hostnames with upper-case letters
[webmin.git] / shorewall / check.cgi
1 #!/usr/local/bin/perl
2 # check.cgi
3 # Check if the firewall is valid
4
5 require './shorewall-lib.pl';
6 &ui_print_header(undef, $text{'check_title'}, "");
7 print "<b>$text{'check_cmd'}</b><br>\n";
8 print "<font size=-1><pre>";
9 open(STATUS, "$config{'shorewall'} check 2>&1 |");
10 while(<STATUS>) {
11         print &html_escape($_);
12         }
13 close(STATUS);
14 print "</pre></font>\n";
15 if ($?) {
16         print "<b>$text{'check_failed'}</b><p>\n";
17         }
18 else {
19         print "<b>$text{'check_ok'}</b><p>\n";
20         }
21 &ui_print_footer("", $text{'index_return'});
22