1 |
a1aa91de
|
Steve Beaver
|
<?php
|
2 |
|
|
/*
|
3 |
|
|
* execacb.php
|
4 |
|
|
*
|
5 |
|
|
* part of pfSense (https://www.pfsense.org)
|
6 |
38809d47
|
Renato Botelho do Couto
|
* Copyright (c) 2004-2013 BSD Perimeter
|
7 |
|
|
* Copyright (c) 2013-2016 Electric Sheep Fencing
|
8 |
37d60e23
|
Luiz Souza
|
* Copyright (c) 2014-2025 Rubicon Communications, LLC (Netgate)
|
9 |
a1aa91de
|
Steve Beaver
|
* Copyright (c) 2009 Erik Kristensen
|
10 |
|
|
* All rights reserved.
|
11 |
|
|
*
|
12 |
|
|
* originally part of m0n0wall (http://m0n0.ch/wall)
|
13 |
|
|
* Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>.
|
14 |
|
|
* All rights reserved.
|
15 |
|
|
*
|
16 |
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
17 |
|
|
* you may not use this file except in compliance with the License.
|
18 |
|
|
* You may obtain a copy of the License at
|
19 |
|
|
*
|
20 |
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
21 |
|
|
*
|
22 |
|
|
* Unless required by applicable law or agreed to in writing, software
|
23 |
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
24 |
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
25 |
|
|
* See the License for the specific language governing permissions and
|
26 |
|
|
* limitations under the License.
|
27 |
|
|
*/
|
28 |
|
|
|
29 |
c81106eb
|
Jim Pingle
|
/*
|
30 |
|
|
* This script is called by cron to perform a periodic scheduled backup of the
|
31 |
|
|
* current configuration using the AutoConfigBackup service.
|
32 |
|
|
*/
|
33 |
a1aa91de
|
Steve Beaver
|
|
34 |
c81106eb
|
Jim Pingle
|
require_once("acb.inc");
|
35 |
a1aa91de
|
Steve Beaver
|
|
36 |
c81106eb
|
Jim Pingle
|
if (acb_enabled()) {
|
37 |
|
|
if (is_acb_upload_needed()) {
|
38 |
|
|
write_config(gettext('Scheduled Backup via AutoConfigBackup'));
|
39 |
|
|
acb_backup_stage_upload();
|
40 |
|
|
} else {
|
41 |
|
|
log_error(gettext('Skipping AutoConfigBackup scheduled backup (no changes since previous backup)'));
|
42 |
|
|
}
|
43 |
|
|
}
|