Handle hostnames with upper-case letters
[webmin.git] / squid / backup_config.pl
1
2 do 'squid-lib.pl';
3
4 # backup_config_files()
5 # Returns files and directories that can be backed up
6 sub backup_config_files
7 {
8 # Add main config file
9 local @rv = ( $config{'squid_conf'} );
10
11 # Add users file
12 local $conf = &get_config();
13 local $file = &get_auth_file($conf);
14 push(@rv, $file) if ($file);
15
16 # Add files from ACLs
17 local @acl = &find_config("acl", $conf);
18 local $a;
19 foreach $a (@acl) {
20         if ($a->{'values'}->[2] =~ /^"(.*)"$/ || $a->{'values'}->[3] =~ /^"(.*)"$/) {
21                 push(@rv, $1);
22                 }
23         }
24
25 return &unique(@rv);
26 }
27
28 # pre_backup(&files)
29 # Called before the files are actually read
30 sub pre_backup
31 {
32 return undef;
33 }
34
35 # post_backup(&files)
36 # Called after the files are actually read
37 sub post_backup
38 {
39 return undef;
40 }
41
42 # pre_restore(&files)
43 # Called before the files are restored from a backup
44 sub pre_restore
45 {
46 return undef;
47 }
48
49 # post_restore(&files)
50 # Called after the files are restored from a backup
51 sub post_restore
52 {
53 return &apply_configuration();
54 }
55
56 1;
57