const fs = require("fs"); log("MistyCore-Startup-Hostname", "Setting hostname to " + require('fs').readFileSync(systemRoot + "/Preferences/Hostname").toString().trim()); require('child_process').execFileSync("/System/Binaries/hostname", [ "--", require('fs').readFileSync(systemRoot + "/Preferences/Hostname").toString().trim() ]); global.hostname = require('fs').readFileSync(systemRoot + "/Preferences/Hostname").toString().trim(); fs.writeFileSync(systemRoot + "/../Volumes/VM/Hostname", hostname); log("MistyCore-Startup-Hostname", "Set hostname successfully");