mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Motd/version fixes, some logging improvements, manual update
This commit is contained in:
parent
c53c181a5b
commit
e0f7027b26
5 changed files with 22 additions and 98 deletions
4
motd.js
4
motd.js
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue