1
|
|
2
|
do 'mon-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, $mon_config_file);
|
10
|
push(@rv, &mon_users_file());
|
11
|
push(@rv, &mon_auth_file());
|
12
|
return @rv;
|
13
|
}
|
14
|
|
15
|
# pre_backup(&files)
|
16
|
# Called before the files are actually read
|
17
|
sub pre_backup
|
18
|
{
|
19
|
return undef;
|
20
|
}
|
21
|
|
22
|
# post_backup(&files)
|
23
|
# Called after the files are actually read
|
24
|
sub post_backup
|
25
|
{
|
26
|
return undef;
|
27
|
}
|
28
|
|
29
|
# pre_restore(&files)
|
30
|
# Called before the files are restored from a backup
|
31
|
sub pre_restore
|
32
|
{
|
33
|
return undef;
|
34
|
}
|
35
|
|
36
|
# post_restore(&files)
|
37
|
# Called after the files are restored from a backup
|
38
|
sub post_restore
|
39
|
{
|
40
|
if (&check_pid_file($config{'pid_file'})) {
|
41
|
return &restart_mon();
|
42
|
}
|
43
|
return undef;
|
44
|
}
|
45
|
|
46
|
1;
|
47
|
|