From ee4087b15a178c184f0fb460680e6be454c49efc Mon Sep 17 00:00:00 2001 From: Eric Claeys <83164203+EricClaeys@users.noreply.github.com> Date: Sat, 20 Jul 2024 01:03:02 -0600 Subject: [PATCH] Update allskySettings.php: only call postData.sh for major changes This significantly speeds it up when no upload is needed. --- html/includes/allskySettings.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/html/includes/allskySettings.php b/html/includes/allskySettings.php index dbd24b180..cd531417e 100644 --- a/html/includes/allskySettings.php +++ b/html/includes/allskySettings.php @@ -534,7 +534,11 @@ function DisplayAllskyConfig() { } // If there's a website let it know of the changes. - if (($changesMade || $fromConfiguration) && ($useLocalWebsite || $useRemoteWebsite)) { + // Because postData.sh can take a while to upload files, + // and it's called at end of night and uploads the settings file, + // only call it here for major changes. + if (($twilightDataChanged || $cameraChanged || $fromConfiguration) && + ($useLocalWebsite || $useRemoteWebsite)) { $CMD = "sudo --user=" . ALLSKY_OWNER . " " . ALLSKY_SCRIPTS; $moreArgs = "";