Handle hostnames with upper-case letters
[webmin.git] / itsecur-firewall / bootup.cgi
1 #!/usr/bin/perl
2 # bootup.cgi
3 # Enable or disable iptables at boot time
4
5 require './itsecur-lib.pl';
6 &can_edit_error("bootup");
7 &ReadParse();
8 &foreign_require("init", "init-lib.pl");
9 &foreign_require("cron", "cron-lib.pl");
10
11 # Create the wrapper script
12 $start_wrapper_script = "$module_config_directory/apply.pl";
13 $stop_wrapper_script = "$module_config_directory/stop.pl";
14 &cron::create_wrapper($start_wrapper_script, $module_name, "apply.pl");
15 &cron::create_wrapper($stop_wrapper_script, $module_name, "stop.pl");
16
17 if ($in{'boot'}) {
18         &init::enable_at_boot("itsecur-firewall",
19                               "Start or stop the ITsecur firewall",
20                               $start_wrapper_script,
21                               $stop_wrapper_script);
22         &remote_webmin_log("bootup");
23         }
24 else {
25         &init::disable_at_boot("itsecur-firewall");
26         &remote_webmin_log("bootdown");
27         }
28
29 &redirect("");
30