Skip to content

Commit

Permalink
Update allskySettings.php: only call postData.sh for major changes
Browse files Browse the repository at this point in the history
This significantly speeds it up when no upload is needed.
  • Loading branch information
EricClaeys authored Jul 20, 2024
1 parent 74742f7 commit ee4087b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion html/includes/allskySettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "";
Expand Down

0 comments on commit ee4087b

Please sign in to comment.