aboutsummaryrefslogtreecommitdiffstats
path: root/prosody
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-06-05 01:27:18 +0100
committerMatthew Wild <mwild1@gmail.com>2009-06-05 01:27:18 +0100
commit6e793bb1ae789c71f97ba0ae779e49669e1ca83c (patch)
treea702fb79bb24a4083019aaf0077d19d19cf41df9 /prosody
parent198b2b72c806f0c93a964ff18e1cc1800a48760b (diff)
downloadprosody-6e793bb1ae789c71f97ba0ae779e49669e1ca83c.tar.gz
prosody-6e793bb1ae789c71f97ba0ae779e49669e1ca83c.zip
prosody: Read version from prosody.version file and set, er, prosody.version!
Diffstat (limited to 'prosody')
-rwxr-xr-xprosody11
1 files changed, 11 insertions, 0 deletions
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"