3 # Create, enable or disable PPTP startup at boot time
5 require './pptp-client-lib.pl';
6 &foreign_require("init", "init-lib.pl");
9 $start_cmd = "$module_config_directory/start.pl";
10 $stop_cmd = "$module_config_directory/stop.pl";
13 # Create start and stop wrapper scripts
14 &foreign_require("cron", "cron-lib.pl");
15 &cron::create_wrapper($start_cmd, $module_name, "start.pl");
16 &cron::create_wrapper($stop_cmd, $module_name, "stop.pl");
18 # Enable starting at boot
19 &init::enable_at_boot($module_name,
20 "Startup or shutdown PPTP connection",
21 $start_cmd, $stop_cmd);
22 $config{'boot'} = $in{'tunnel'};
25 # Disable starting at boot
26 &init::disable_at_boot($module_name);
27 delete($config{'boot'});
31 &save_module_config();