aboutsummaryrefslogtreecommitdiffstats
path: root/config/autoconfigbackup/autoconfigbackup.inc
diff options
context:
space:
mode:
Diffstat (limited to 'config/autoconfigbackup/autoconfigbackup.inc')
-rw-r--r--config/autoconfigbackup/autoconfigbackup.inc12
1 files changed, 5 insertions, 7 deletions
diff --git a/config/autoconfigbackup/autoconfigbackup.inc b/config/autoconfigbackup/autoconfigbackup.inc
index f67191ae..0ca3ebe9 100644
--- a/config/autoconfigbackup/autoconfigbackup.inc
+++ b/config/autoconfigbackup/autoconfigbackup.inc
@@ -130,13 +130,11 @@ function upload_config($reasonm = "") {
}
// Define some needed variables
- if(!file_exists("/cf/conf/lastpfSbackup.txt")) {
- conf_mount_rw();
- touch("/cf/conf/lastpfSbackup.txt");
- conf_mount_ro();
- }
+ if(file_exists("/cf/conf/lastpfSbackup.txt"))
+ $last_backup_date = str_replace("\n", "", file_get_contents("/cf/conf/lastpfSbackup.txt"));
+ else
+ $last_backup_date = "";
- $last_backup_date = str_replace("\n", "", file_get_contents("/cf/conf/lastpfSbackup.txt"));
$last_config_change = $config['revision']['time'];
$hostname = $config['system']['hostname'] . "." . $config['system']['domain'];
if($reasonm)
@@ -241,4 +239,4 @@ function upload_config($reasonm = "") {
}
}
-?> \ No newline at end of file
+?>