Do not rely on the VPS name but just get the memory from the system

This commit is contained in:
Johannes Zellner
2015-12-31 10:30:42 +01:00
parent a6eca44a0d
commit bad28c60ae

View File

@@ -33,12 +33,12 @@ var apps = require('./apps.js'),
async = require('async'),
backups = require('./backups.js'),
BackupsError = require('./backups.js').BackupsError,
bytes = require('bytes'),
clientdb = require('./clientdb.js'),
config = require('./config.js'),
debug = require('debug')('box:cloudron'),
fs = require('fs'),
locker = require('./locker.js'),
os = require('os'),
path = require('path'),
paths = require('./paths.js'),
progress = require('./progress.js'),
@@ -292,10 +292,6 @@ function getConfig(callback) {
};
}
// We rely at the moment on the size being specified in 512mb,1gb,...
// TODO provide that number from the appstore
var memory = bytes(result.size) || 0;
settings.getCloudronName(function (error, cloudronName) {
if (error) return callback(new CloudronError(CloudronError.INTERNAL_ERROR, error));
@@ -315,7 +311,7 @@ function getConfig(callback) {
developerMode: developerMode,
region: result.region,
size: result.size,
memory: memory,
memory: os.totalmem(),
provider: config.provider(),
cloudronName: cloudronName
});