Skip to content

Commit 7a8c1c6

Browse files
committed
Participate in Webmin config backup webmin/webmin#2106
1 parent 7e6f4f9 commit 7a8c1c6

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

backup_config.pl

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
2+
require 'virtualmin-nginx-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;
9+
push(@rv, &get_all_config_files());
10+
return &unique(@rv);
11+
}
12+
13+
# pre_backup(&files)
14+
# Called before the files are actually read
15+
sub pre_backup
16+
{
17+
return undef;
18+
}
19+
20+
# post_backup(&files)
21+
# Called after the files are actually read
22+
sub post_backup
23+
{
24+
return undef;
25+
}
26+
27+
# pre_restore(&files)
28+
# Called before the files are restored from a backup
29+
sub pre_restore
30+
{
31+
return undef;
32+
}
33+
34+
# post_restore(&files)
35+
# Called after the files are restored from a backup
36+
sub post_restore
37+
{
38+
if (&is_nginx_running()) {
39+
return &apply_nginx();
40+
}
41+
return undef;
42+
}
43+
44+
1;
45+

0 commit comments

Comments
 (0)