X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=prosody;h=e7457627ad6098e34648c756d41d57034b94e53c;hb=d438c10f509ab2bfcbdf0e5459b16fb010f6f2fe;hp=0618a1f3d3b52aa15750ba134edf08c4178b1fee;hpb=95c64b70f7cb28745222146784181e866b515069;p=prosody.git diff --git a/prosody b/prosody index 0618a1f3..e7457627 100755 --- a/prosody +++ b/prosody @@ -93,6 +93,17 @@ function init_global_state() prosody.events = require "util.events".new(); + prosody.platform = "unknown"; + if os.getenv("WINDIR") then + prosody.platform = "windows"; + elseif package.config:sub(1,1) == "/" then + prosody.platform = "posix"; + end + + prosody.installed = nil; + if CFG_SOURCEDIR and (prosody.platform == "windows" or CFG_SOURCEDIR:match("^/")) then + prosody.installed = true; + end -- Function to reload the config file function prosody.reload_config()