Update start methods.

This commit is contained in:
Michael Teeuw
2020-02-01 13:56:15 +01:00
parent 3bb801f579
commit 09c1ea992c
5 changed files with 10 additions and 88 deletions

View File

@@ -4,7 +4,6 @@
* By Michael Teeuw http://michaelteeuw.nl
* MIT Licensed.
*/
var fs = require("fs");
var Server = require(__dirname + "/server.js");
var Utils = require(__dirname + "/utils.js");
@@ -24,6 +23,11 @@ console.log("Starting MagicMirror: v" + global.version);
// global absolute root path
global.root_path = path.resolve(__dirname + "/../");
if (!process.env.DISPLAY) {
console.log("DISPLAY environment variable not set. Using DISPLAY=:0");
process.env.DISPLAY = ":0";
}
if (process.env.MM_CONFIG_FILE) {
global.configuration_file = process.env.MM_CONFIG_FILE;
}