Handle hostnames with upper-case letters
[webmin.git] / qmailadmin / backup_config.pl
1
2 do 'qmail-lib.pl';
3
4 # backup_config_files()
5 # Returns files and directories that can be backed up
6 sub backup_config_files
7 {
8 local (@rv, $d, $f);
9 foreach $d ($qmail_control_dir, $qmail_alias_dir, $qmail_users_dir) {
10         opendir(DIR, $d);
11         foreach $f (readdir(DIR)) {
12                 next if ($f eq "." || $f eq ".." || $f =~ /\.rpmsave$/i);
13                 push(@rv, "$d/$f");
14                 }
15         closedir(DIR);
16         }
17 return @rv;
18 }
19
20 # pre_backup(&files)
21 # Called before the files are actually read
22 sub pre_backup
23 {
24 return undef;
25 }
26
27 # post_backup(&files)
28 # Called after the files are actually read
29 sub post_backup
30 {
31 return undef;
32 }
33
34 # pre_restore(&files)
35 # Called before the files are restored from a backup
36 sub pre_restore
37 {
38 return undef;
39 }
40
41 # post_restore(&files)
42 # Called after the files are restored from a backup
43 sub post_restore
44 {
45 &restart_qmail();
46 return undef;
47 }
48
49 1;
50