mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 23:46:14 -04:00
working, need to test though
This commit is contained in:
parent
7e7eb542be
commit
ddc69831b2
4 changed files with 27 additions and 18 deletions
|
@ -10,24 +10,9 @@ var server;
|
|||
var serverName;
|
||||
|
||||
exports.createServer = function () {
|
||||
//try to get the git version
|
||||
var version = "";
|
||||
try
|
||||
{
|
||||
var rootPath = path.resolve(npm.dir, '..');
|
||||
var ref = fs.readFileSync(rootPath + "/.git/HEAD", "utf-8");
|
||||
var refPath = rootPath + "/.git/" + ref.substring(5, ref.indexOf("\n"));
|
||||
version = fs.readFileSync(refPath, "utf-8");
|
||||
version = version.substring(0, 7);
|
||||
console.log("Your Etherpad git version is " + version);
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
console.warn("Can't get git version for server header\n" + e.message)
|
||||
}
|
||||
console.log("Report bugs at https://github.com/ether/etherpad-lite/issues")
|
||||
|
||||
serverName = "Etherpad " + version + " (http://etherpad.org)";
|
||||
serverName = "Etherpad " + settings.getGitCommit() + " (http://etherpad.org)";
|
||||
|
||||
exports.restartServer();
|
||||
|
||||
|
@ -38,7 +23,6 @@ exports.createServer = function () {
|
|||
else{
|
||||
console.warn("Admin username and password not set in settings.json. To access admin please uncomment and edit 'users' in settings.json");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
exports.restartServer = function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue