Handle hostnames with upper-case letters
[webmin.git] / itsecur-firewall / stop.pl
1 #!/usr/bin/perl
2 # stop.pl
3 # Stop the firewall
4
5 $ENV{'WEBMIN_CONFIG'} ||= "/etc/webmin";
6 $ENV{'WEBMIN_VAR'} ||= "/var/webmin";
7 $no_acl_check++;
8 if ($0 =~ /^(.*\/)[^\/]+$/) {
9         chdir($1);
10         }
11 require './itsecur-lib.pl';
12 $module_name eq 'itsecur-firewall' || die "Command must be run with full path";
13
14 print "$text{'stop_doing'}\n";
15 $err = &stop_rules();
16 if ($err) {
17         print &text('stop_failed', $err),"\n";
18         exit(1);
19         }
20 else {
21         print "$text{'stop_done'}\n";
22         &disable_routing();
23         exit(0);
24         }
25