-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Participate in Webmin config backup webmin/webmin#2106
- Loading branch information
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
require 'virtualmin-nginx-lib.pl'; | ||
|
||
# backup_config_files() | ||
# Returns files and directories that can be backed up | ||
sub backup_config_files | ||
{ | ||
local @rv; | ||
push(@rv, &get_all_config_files()); | ||
return &unique(@rv); | ||
} | ||
|
||
# pre_backup(&files) | ||
# Called before the files are actually read | ||
sub pre_backup | ||
{ | ||
return undef; | ||
} | ||
|
||
# post_backup(&files) | ||
# Called after the files are actually read | ||
sub post_backup | ||
{ | ||
return undef; | ||
} | ||
|
||
# pre_restore(&files) | ||
# Called before the files are restored from a backup | ||
sub pre_restore | ||
{ | ||
return undef; | ||
} | ||
|
||
# post_restore(&files) | ||
# Called after the files are restored from a backup | ||
sub post_restore | ||
{ | ||
if (&is_nginx_running()) { | ||
return &apply_nginx(); | ||
} | ||
return undef; | ||
} | ||
|
||
1; | ||
|