Add route to set/get sysinfo
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
exports = module.exports = {
|
||||
getServerIp: getServerIp,
|
||||
testConfig: testConfig,
|
||||
|
||||
hasIPv6: hasIPv6
|
||||
};
|
||||
@@ -41,3 +42,10 @@ function hasIPv6() {
|
||||
// on contabo, /proc/net/if_inet6 is an empty file. so just exists is not enough
|
||||
return fs.existsSync(IPV6_PROC_FILE) && fs.readFileSync(IPV6_PROC_FILE, 'utf8').trim().length !== 0;
|
||||
}
|
||||
|
||||
function testConfig(config, callback) {
|
||||
assert.strictEqual(typeof config, 'object');
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
|
||||
api(config.provider).testConfig(config, callback);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user