diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-06-05 01:27:18 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-06-05 01:27:18 +0100 |
commit | 6e793bb1ae789c71f97ba0ae779e49669e1ca83c (patch) | |
tree | a702fb79bb24a4083019aaf0077d19d19cf41df9 | |
parent | 198b2b72c806f0c93a964ff18e1cc1800a48760b (diff) | |
download | prosody-6e793bb1ae789c71f97ba0ae779e49669e1ca83c.tar.gz prosody-6e793bb1ae789c71f97ba0ae779e49669e1ca83c.zip |
prosody: Read version from prosody.version file and set, er, prosody.version!
-rwxr-xr-x | prosody | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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" |