Matthew Wild
68fa291829
util.prosodyctl: Add comments to explain logic and expected behaviour ( #1688 )
2025-02-06 14:42:18 +00:00
Kim Alvefur
4701e73a72
util.prosodyctl: Use notify socket to wait for Prosody to be ready
...
Previously, prosodyctl only waits for the pidfile to appear, which does
not necessarily mean that Prosody is fully ready to receive traffic.
By waiting until Prosody says it's ready via the systemd notify socket
we know for sure that Prosody is really ready.
Notably this should ensure that when running `make integration-test`
Prosody is really ready when Scansion starts running tests.
Not sure if this timeout handling is optimal.
2024-05-19 13:06:55 +02:00
Kim Alvefur
43531740f9
util: Prefix module imports with prosody namespace
2023-03-17 16:23:16 +01:00
Kim Alvefur
e673312b7f
util.prosodyctl: Remove Lua 5.1 os.execute() return value compat
2022-10-20 17:37:07 +02:00
Kim Alvefur
7bd2718601
util.prosodyctl: Install plugins for current Lua version
...
Fixes that luarocks defaults to installing the rock for its own runtime
version of Lua.
This only works with luarocks 3.x, it does nothing on 2.x as currently
available from Debian.
2021-03-16 02:44:22 +01:00
Kim Alvefur
57a971534d
util.prosodyctl: Remove unused calculation [luacheck]
2021-01-21 19:18:38 +01:00
Kim Alvefur
7665c764b5
util.prosodyctl: Rename unused variable to '_' [luacheck]
2021-01-21 19:17:31 +01:00
Kim Alvefur
d1ace000c7
util.prosodyctl: Always return exit code from luarocks
...
os.exit(true) errors on Lua 5.1
2021-01-21 19:15:28 +01:00
Kim Alvefur
bd62b3bce7
prosodyctl: Move UI related calls out of util.prosodyctl
...
I think this follows the general separation of duties between prosodyctl
and util.prosodyctl better.
2021-01-21 19:04:57 +01:00
Kim Alvefur
47c0ab5788
util.prosodyctl: Reword message to sound more natural
...
English is hard. "to" might also work, but we'll go with this for now.
18:32:11 <MattJ> s/at/in/ ?
18:32:19 <MattJ> to match luarocks :)
2021-01-21 18:50:19 +01:00
Kim Alvefur
f3856b703d
util.prosodyctl: Propagate status from luarocks invocation
2021-01-21 18:43:16 +01:00
Kim Alvefur
50d9045de6
util.prosodyctl: Use installer path prepared by util.startup
2021-01-21 18:39:18 +01:00
Kim Alvefur
ef24d8cd72
util.prosodyctl: Simplify luarocks invocation
2020-10-05 21:23:39 +02:00
Kim Alvefur
28aadca557
util.prosodyctl: Move hardcoded luarocks server into prosodyctl
...
To be replaced with config option in future commit
2020-10-05 21:24:07 +02:00
Kim Alvefur
b74859e35c
util.prosodyctl: Flip argument order
...
"verb subject" feels better than "subject verb", especially since the
subject (module) is optional.
2020-10-05 21:17:29 +02:00
Kim Alvefur
3c0445e1b2
util.prosodyctl: Construct luarocks command line with templates
...
More flexible and safer wrt escaping
2020-10-05 21:13:23 +02:00
Matthew Wild
46022b0988
prosodyctl+util.prosodyctl.*: Start breaking up the ever-growing prosodyctl
2020-06-02 08:01:21 +01:00
Kim Alvefur
a15d977f44
util.prosodyctl: Pass command line flag to force daemonization on start
...
Part of the deprecation of the 'daemonize' config option.
Further, it is a bit weird to run `prosodyctl start` and get Prosody
running in the foreground.
2020-01-26 16:40:21 +01:00
Kim Alvefur
14d66d8412
util.prosodyctl: Silence luacheck warnings
2019-12-23 21:16:00 +01:00
Kim Alvefur
45936787cb
util.prosodyctl: Enforce strict JID validation on user creation
...
This is where 64ddcbc9a328 should have started. By preventing creation
of users with invalid JIDs, it will slowly become safer to enforce
strict validation on everything.
2019-11-01 22:53:14 +01:00
João Duarte
6ae5f04781
util/prosodyctl: call_luarocks now sets a directory variable itself
2019-08-16 15:03:50 -07:00
João Duarte
d323072816
util/prosodyctl: Removed the check_flags and execute_command function
2019-08-16 15:01:57 -07:00
João Duarte
ee4ae338f9
util.prosodyctl: Changed a comment
2019-08-01 04:16:00 -07:00
João Duarte
5aa4dda0fb
util.prosodyctl: The check_flags function now considers that a module, if given, is specified at the penultimate argument it receives
2019-07-31 11:08:43 -07:00
João Duarte
2049e20696
util.prosodyctl: Added the execute_command function
2019-07-31 11:00:20 -07:00
João Duarte
2b8e9031a4
util.prosodyctl: call_luarocks function is now compatible with the list command
2019-07-31 10:22:11 -07:00
João Duarte
289378113a
util.prosodyctl: Function now differentiates its output, depending if it is being called by install or remove
2019-07-31 10:02:42 -07:00
João Duarte
b60081c28c
util.prosodyctl: Added the call_luarocks function
2019-07-31 07:24:43 -07:00
João Duarte
d2524edff4
util.prosodyctl: Added the check_flags function
2019-07-31 06:42:13 -07:00
João Duarte
52f963350f
util.prosodyctl: Created the helper function get_path_custom_plugins
2019-07-24 11:20:35 -07:00
João Duarte
c84fa6fd26
util.prosodyctl: Removed the admin_operation command
2019-07-24 04:44:44 -07:00
João Duarte
94ddde2e9e
util.prosodyctl: Added the show_module_configuration_help function
2019-07-23 10:24:55 -07:00
João Duarte
c21b60857f
util.prosodyctl: Corrected indentation on my code
2019-07-20 12:41:31 -07:00
João Duarte
7555016ac2
util.prosodyctl: Added help support to 'admin_operation'
2019-06-27 18:01:36 +01:00
João Duarte
122bde2f2c
util.prosodyctl: Moved the 'admin_operation' function from prosodyctl to here
2019-06-25 13:20:54 +01:00
Kim Alvefur
8d8c6bd619
util.prosodyctl: Allow passing path to Lua runtime to the start() function
...
By default the shebang is used. Being able to override it is useful in
cases where the shebang does not match the configured runtime.
2019-01-10 14:57:26 +01:00
Kim Alvefur
deff4bc96d
util.prosodyctl: Rename variables for consistency (thanks Link Mauve)
2018-06-06 22:27:40 +02:00
Matthew Wild
c0912560a4
prosodyctl, util.prosodyctl: Pass source path as a parameter instead of global variable
2018-03-22 21:54:59 +00:00
Matthew Wild
56a757fc5a
util.prosodyctl: Fix getpass() for new return values of os.execute() in Lua 5.2
2018-03-20 16:07:50 +00:00
Kim Alvefur
a18da188f6
util.prosodyctl: Resolve possibly relative pidfile path (fixes inconsistency with mod_posix)
2017-04-24 16:24:28 +02:00
Kim Alvefur
f7c083c86a
util.prosodyctl: Handle os.execute in Lua 5.2 returning true when command terminates successfully
2016-06-23 21:07:48 +02:00
Matthew Wild
0d16907ff3
util.prosodyctl: Remove unused variable [luacheck]
2016-03-10 17:53:36 +00:00
Matthew Wild
8967760df5
net.websocket.frames, util.datetime, util.json, util.prosodyctl, util.rfc6724: Remove unused variables [luacheck]
2016-03-10 17:52:03 +00:00
Kim Alvefur
eaa823a597
util.*: Remove use of module() function, make all module functions local and return them in a table at the end
2015-02-21 10:36:37 +01:00
Kim Alvefur
97ed1aed6c
util.{interpolation,prosodyctl,sql}: Trim trailing whitespace
2015-07-17 12:43:04 +02:00
Matthew Wild
878efeecd5
Merge 0.9->0.10
2014-08-28 09:23:24 +01:00
Kim Alvefur
6af9beaccf
prosodyctl: Verify that 'pidfile' is a string, show friendly error otherwise
2014-08-26 12:00:51 +02:00
Kim Alvefur
5d027d7f71
prosodyctl, util.prosodyctl: Update to reflect that mod_posix gets loaded by default on posix platforms
2014-04-10 00:24:29 +02:00
Florian Zeitz
1d833bb807
Remove all trailing whitespace
2013-08-09 17:48:21 +02:00
Matthew Wild
fbee5003f7
util.prosodyctl: Initialize storagemanager on the host before initializing usermanager. This fixes brokenness when the auth provider opens the store on load (as they all do since eeea0eb2602a) (thanks nulani)
2013-04-27 13:11:03 +01:00