mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2026-04-28 03:07:38 +02:00
Motd/version fixes, some logging improvements, manual update
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
const utils = require('./utils.js');
|
||||
const dataFile = "public/data.json";
|
||||
const versionFile = "public/version";
|
||||
const motdFile = "public/motd";
|
||||
|
||||
var p = GetParams();
|
||||
if (p.length <= 0) {
|
||||
@@ -15,6 +17,8 @@ var parsed = JSON.parse(d);
|
||||
parsed.motd = param;
|
||||
utils.WriteFile(JSON.stringify(parsed), dataFile);
|
||||
|
||||
utils.WriteFile(parsed.motd, motdFile);
|
||||
|
||||
function GetParams() {
|
||||
return process.argv.splice(2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user