Handle hostnames with upper-case letters
[webmin.git] / pap / save_sync.cgi
1 #!/usr/local/bin/perl
2 # save_sync.cgi
3 # Save unix-ppp synchronisation options
4
5 require './pap-lib.pl';
6 $access{'secrets'} || &error($text{'secrets_ecannot'});
7 $access{'sync'} || &error($text{'sync_ecannot'});
8 &ReadParse();
9
10 &lock_file("$module_config_directory/config");
11 foreach $s ("add", "change", "delete") {
12         if ($in{$s}) { $config{"sync_$s"} = 1; }
13         else { delete($config{"sync_$s"}); }
14         }
15 $config{'sync_server'} = $in{'server'};
16 &write_file("$module_config_directory/config", \%config);
17 &unlock_file("$module_config_directory/config");
18 &webmin_log("sync", undef, undef, \%in);
19 &redirect("");
20