separate the provision status and cloudron status

This commit is contained in:
Girish Ramakrishnan
2023-08-10 18:45:27 +05:30
parent 98719aa942
commit 1cdd528b45
13 changed files with 93 additions and 75 deletions
+11
View File
@@ -3,6 +3,8 @@
exports = module.exports = {
initialize,
uninitialize,
getStatus,
getConfig,
onActivated,
@@ -129,6 +131,15 @@ async function runStartupTasks() {
}
}
async function getStatus() {
return {
version: constants.VERSION,
cloudronName: await branding.getCloudronName(), // still used in passwordreset and setupaccount views
footer: await branding.renderFooter(), // still used in passwordreset and setupaccount views
language: await getLanguage(), // still used in passwordreset and setupaccount views
};
}
async function getConfig() {
const release = safe.fs.readFileSync('/etc/lsb-release', 'utf-8');
if (release === null) throw new BoxError(BoxError.FS_ERROR, safe.error.message);