# HG changeset patch # User Matthew Wild # Date 1244161638 -3600 # Node ID fc113027a1d52ce698cdda1578ae315c3ae52bab # Parent b5a7a9fc91613d6f54e949cd312ed79c415ff835 prosody: Read version from prosody.version file and set, er, prosody.version! diff -r b5a7a9fc9161 -r fc113027a1d5 prosody --- a/prosody Fri Jun 05 01:13:39 2009 +0100 +++ b/prosody Fri Jun 05 01:27:18 2009 +0100 @@ -87,6 +87,17 @@ prosody.events = require "util.events".new(); +-- Try to determine version +local version_file = io.open((CFG_SOURCEDIR or ".").."/prosody.version"); +if version_file then + prosody.version = version_file:read("*a"):gsub("%s*$", ""); + version_file:close(); +else + prosody.version = "unknown"; +end + +log("info", "Hello and welcome to Prosody version %s", prosody.version); + --- Load and initialise core modules require "util.import" require "core.xmlhandlers"