aboutsummaryrefslogtreecommitdiffstats
path: root/prosodyctl
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2020-01-23 21:59:43 +0000
committerMatthew Wild <mwild1@gmail.com>2020-01-23 21:59:43 +0000
commitf0b1353582c393ce12ce1fcf1c875539c8325966 (patch)
tree5abf6ad804ed186c8979faf1fafe9fcbcaf1145b /prosodyctl
parent79d8e994a24c7ecc7cdad98e9182996b27970557 (diff)
parent75a1867ca5afbc933fc215d0e354734c605fdc8c (diff)
downloadprosody-f0b1353582c393ce12ce1fcf1c875539c8325966.tar.gz
prosody-f0b1353582c393ce12ce1fcf1c875539c8325966.zip
Merge 0.11->trunk
Diffstat (limited to 'prosodyctl')
-rwxr-xr-xprosodyctl9
1 files changed, 5 insertions, 4 deletions
diff --git a/prosodyctl b/prosodyctl
index 21a1f9ba..cc3ca3a5 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -68,6 +68,7 @@ local modulemanager = require "core.modulemanager"
local prosodyctl = require "util.prosodyctl"
local socket = require "socket"
local dependencies = require "util.dependencies";
+local lfs = dependencies.softreq "lfs";
-----------------------
@@ -222,14 +223,15 @@ function commands.deluser(arg)
return 1;
end
-local function service_command_warning(command)
+local function service_command_warning(service_command)
if prosody.installed and configmanager.get("*", "prosodyctl_service_warnings") ~= false then
show_warning("WARNING: Use of prosodyctl start/stop/restart/reload is not recommended");
show_warning(" if Prosody is managed by an init system - use that directly instead.");
+ lfs = lfs or require
if lfs.attributes("/etc/systemd") then
- show_warning(" e.g. systemctl %s prosody", command);
+ show_warning(" e.g. systemctl %s prosody", service_command);
elseif lfs.attributes("/etc/init.d/prosody") then
- show_warning(" e.g. /etc/init.d/prosody %s", command);
+ show_warning(" e.g. /etc/init.d/prosody %s", service_command);
end
show_warning("");
end
@@ -551,7 +553,6 @@ function commands.unregister(arg)
end
local openssl;
-local lfs;
local cert_commands = {};