add json backup fallback

This commit is contained in:
2026-04-22 12:11:05 +02:00
parent 92444ff38c
commit 535742787d
3 changed files with 2442 additions and 3 deletions

View File

@@ -30,15 +30,20 @@ app.locals.path = {
//#endregion
//#region Server configuration
//#region Nesessary json files
const jsonFiles = ['configuration.json', 'stylesheet.json'];
for (var i = 0; i < jsonFiles.length; i++) {
if(!fs.existsSync(`${app.locals.path.source}/models/${jsonFiles[i]}`)) {
fs.copyFileSync(`${app.locals.path.source}/backups/${jsonFiles[i]}.temp`, `${app.locals.path.source}/models/${jsonFiles[i]}`);
}
}
app.locals.stylesheet = JSON.parse(fs.readFileSync(`${app.locals.path.source}/models/stylesheet.json`, 'utf-8'));
app.locals.configuration = JSON.parse(fs.readFileSync(`${app.locals.path.source}/models/configuration.json`, 'utf-8'));
app.locals.package = JSON.parse(fs.readFileSync(`${app.locals.path.root}/package.json`, 'utf-8'));
app.locals.startMenuItems = [ ];
(async () => {
// const server = https.createServer({
// key: fs.readFileSync(`${app.locals.path.source}/secure/${app.locals.configuration.certificate.key}`),

View File

@@ -0,0 +1,104 @@
{
"server": {
"name": "RadixOS",
"daemon": "radix_run",
"port": 5000,
"proxy": "%your_proxy_if_necessary%",
"environment": "development",
"majVersion": "v1."
},
"administration": [
"manuel.sowada"
],
"debug": {
"active": true,
"levelId": 0
},
"plugin": {
"chown": {
"user": "root",
"group": "root"
}
},
"certificate": {
"chain": "fullchain.pem",
"key": "privkey.pem"
},
"integration": {
"token": {
"secret": "effa710843aa7210ac17fc68746850a3c67bfd55bab9c8aef4a0b499ff912b4f"
},
"mail": {
"host": "%mail_server%",
"port": 25,
"tls": {
"rejectUnauthorized": false,
"minVersion": "TLSv1.2"
},
"secure": false,
"requireTLS": true,
"auth": {
"user": "%mail_user%@%mail_domain%",
"pass": "%clear_password% || secure/mail.securekey"
},
"allow_mail_delivery": true
},
"sql": {
"connect": {
"user": "sa",
"logging": false,
"password": "YourStrongPassword123!",
"database": "Radix_OS",
"host": "mssql-express",
"port": 1433,
"pool": {
"max": 10,
"min": 0,
"idle": 25000,
"acquire": 25000,
"requestTimeout": 3000
},
"dialectOptions": {
"options": {
"description_encrypt": "true for azure",
"encrypt": false
}
}
},
"databasetables": {
"authentications": "Authentication",
"eventlog": "Eventlog",
"development": "Development",
"plugins": "Plugins"
}
},
"activedirectory": {
"url": "ldap://%your_domain_name%",
"baseDN": "ou=%oranization_unit%,dc=%domain_controller%",
"username": "%ldap_user%",
"password": "%ldap_user_password%",
"userAttributes": [
"dn",
"cn",
"mail",
"memberOf"
],
"groupAttributes": [
"dn",
"cn",
"description",
"member"
],
"computerAttributes": [
"cn",
"dNSHostName",
"operatingSystem"
]
}
},
"text": {
"forbidden": "Du bist nicht würdig diese Seite zu betrachten!!! 🔨",
"restart": "Ein Neustart wurde durchgeführt. Sie werden in {restart_sec} Sekunden zur Startseite weitergeleitet!",
"shutdown": "Das System wurde von einem Administrator, oder aufgrund eines Fehlers automatisch heruntergefahren. Der Webserver steht nicht mehr zur Verfügung!"
}
}

File diff suppressed because it is too large Load Diff