Comparison

prosodyctl @ 12802:4a8740e01813

Merge 0.12->trunk
author Kim Alvefur <zash@zash.se>
date Mon, 12 Dec 2022 07:10:54 +0100
parent 12589:39ae08180c81
child 12864:9f9633364044
comparison
equal deleted inserted replaced
12801:ebd6b4d8bf04 12802:4a8740e01813
41 CFG_DATADIR = CFG_DATADIR:gsub("^~", os.getenv("HOME")); 41 CFG_DATADIR = CFG_DATADIR:gsub("^~", os.getenv("HOME"));
42 end 42 end
43 end 43 end
44 44
45 ----------- 45 -----------
46
47 -- Check before first require, to preempt the probable failure
48 if _VERSION < "Lua 5.2" then
49 io.stderr:write("Prosody is no longer compatible with Lua 5.1\n")
50 io.stderr:write("See https://prosody.im/doc/depends#lua for more information\n")
51 return os.exit(1);
52 end
46 53
47 local startup = require "util.startup"; 54 local startup = require "util.startup";
48 startup.prosodyctl(); 55 startup.prosodyctl();
49 56
50 ----------- 57 -----------
571 show_message(error_messages[ret]); 578 show_message(error_messages[ret]);
572 return 1; 579 return 1;
573 end 580 end
574 -- ejabberdctl compatibility 581 -- ejabberdctl compatibility
575 582
576 local unpack = table.unpack or unpack; -- luacheck: ignore 113 583 local unpack = table.unpack;
577 584
578 function commands.register(arg) 585 function commands.register(arg)
579 local user, host, password = unpack(arg); 586 local user, host, password = unpack(arg);
580 if (not (user and host)) or arg[1] == "--help" then 587 if (not (user and host)) or arg[1] == "--help" then
581 if user ~= "--help" then 588 if user ~= "--help" then