aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-10-07 02:33:55 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-10-07 02:33:55 +0000
commit83d01a4452074201005f3f86aadf5de7e2e4bd99 (patch)
tree3d55c200a96c9fe457ee3dc90a1bef13562f5147
parent1301dff7c1549dbedfdc67dbfba6a6170d9dbf2d (diff)
downloadpfsense-packages-83d01a4452074201005f3f86aadf5de7e2e4bd99.tar.gz
pfsense-packages-83d01a4452074201005f3f86aadf5de7e2e4bd99.tar.bz2
pfsense-packages-83d01a4452074201005f3f86aadf5de7e2e4bd99.zip
Only set last backup time if we succeed.
-rw-r--r--packages/autoconfigbackup/upload_config_filter.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/packages/autoconfigbackup/upload_config_filter.php b/packages/autoconfigbackup/upload_config_filter.php
index d26f697d..dfff8688 100644
--- a/packages/autoconfigbackup/upload_config_filter.php
+++ b/packages/autoconfigbackup/upload_config_filter.php
@@ -85,11 +85,6 @@ if(!$username or !$password or !$encryptpw) {
} else {
curl_close($curl_session);
}
-
- // Update last pfS backup time
- $fd = fopen("/cf/conf/lastpfSbackup.txt", "w");
- fwrite($fd, $config['revision']['time']);
- fclose($fd);
if(!strstr($data, "500")) {
$notice_text = "An error occured while uploading your pfSense configuration to portal.pfsense.org";
@@ -97,6 +92,10 @@ if(!$username or !$password or !$encryptpw) {
file_notice("autoconfigurationbackup", $notice_text, $data, "");
update_filter_reload_status($notice_text . " - " . $data);
} else {
+ // Update last pfS backup time
+ $fd = fopen("/cf/conf/lastpfSbackup.txt", "w");
+ fwrite($fd, $config['revision']['time']);
+ fclose($fd);
$notice_text = "End of portal.pfsense.org configuration backup (success).";
log_error($notice_text);
update_filter_reload_status($notice_text);