X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=util%2Fprosodyctl.lua;h=b24e194dad769d2fc5c9c46416f10670a1d7b0cb;hb=9d3b72ab4f32fb981a96f7361ce77838e86e8492;hp=3b523a786bd419800b9d261c05fcdf316f5baec6;hpb=84cd85fec18079f1c684357f4d7bb7813d17a673;p=prosody.git diff --git a/util/prosodyctl.lua b/util/prosodyctl.lua index 3b523a78..b24e194d 100644 --- a/util/prosodyctl.lua +++ b/util/prosodyctl.lua @@ -1,3 +1,11 @@ +-- Prosody IM +-- Copyright (C) 2008-2009 Matthew Wild +-- Copyright (C) 2008-2009 Waqas Hussain +-- +-- This project is MIT/X11 licensed. Please see the +-- COPYING file in the source package for more information. +-- + local config = require "core.configmanager"; local encodings = require "util.encodings"; @@ -9,6 +17,9 @@ local nodeprep, nameprep = stringprep.nodeprep, stringprep.nameprep; local io, os = io, os; local tostring, tonumber = tostring, tonumber; + +local CFG_SOURCEDIR = _G.CFG_SOURCEDIR; + module "prosodyctl" function adduser(params) @@ -55,7 +66,7 @@ function getpid() local file, err = io.open(pidfile); if not file then - return false, "pidfile-read-failed", ret; + return false, "pidfile-read-failed", err; end local pid = tonumber(file:read("*a"));