From 6e793bb1ae789c71f97ba0ae779e49669e1ca83c Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 5 Jun 2009 01:27:18 +0100 Subject: prosody: Read version from prosody.version file and set, er, prosody.version! --- prosody | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'prosody') diff --git a/prosody b/prosody index 577dc178..45d8836b 100755 --- a/prosody +++ b/prosody @@ -87,6 +87,17 @@ prosody.arg = arg; 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" -- cgit v1.2.3