Revert "Read the provider from the settings, not the migration PROVIDER_FILE"

This reverts commit 001749564d.

PROVIDER is still very much alive and active. sysinfo provider is for the network
interface
This commit is contained in:
Girish Ramakrishnan
2020-02-07 09:13:33 -08:00
parent 476ba1ad69
commit f155de0f17
2 changed files with 4 additions and 1 deletions

View File

@@ -664,13 +664,15 @@ function initCache(callback) {
getAll(function (error, allSettings) {
if (error) return callback(error);
const provider = safe.fs.readFileSync(paths.PROVIDER_FILE, 'utf8');
gCache = {
apiServerOrigin: allSettings[exports.API_SERVER_ORIGIN_KEY],
webServerOrigin: allSettings[exports.WEB_SERVER_ORIGIN_KEY],
adminDomain: allSettings[exports.ADMIN_DOMAIN_KEY],
adminFqdn: allSettings[exports.ADMIN_FQDN_KEY],
isDemo: allSettings[exports.DEMO_KEY],
provider: allSettings[exports.SYSINFO_CONFIG_KEY].provider
provider: provider ? provider.trim() : 'generic'
};
callback();