diff options
author | Kim Alvefur <zash@zash.se> | 2023-06-25 17:34:13 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-06-25 17:34:13 +0200 |
commit | a7bbeac47e2bbb86f823775e047615534481c2f2 (patch) | |
tree | 77a00fcd9f12f01456370b1ca6b4dc5079a09dfb /prosodyctl | |
parent | c468bd12c9a8e9ed5123128a67bbdb44c555f6f7 (diff) | |
download | prosody-a7bbeac47e2bbb86f823775e047615534481c2f2.tar.gz prosody-a7bbeac47e2bbb86f823775e047615534481c2f2.zip |
prosodyctl: Add experimental way to reload specific modules directly
Mostly thinking out loud about how various actions may use the shell
This enables the following sequence of commands:
prosodyctl install mod_example
prosodyctl reload mod_example
which is simpler than
prosodyctl shell module reload example
Diffstat (limited to 'prosodyctl')
-rwxr-xr-x | prosodyctl | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -565,6 +565,15 @@ function commands.reload(arg) return 0; end + if arg[1] and arg[1]:match"^mod_" then + -- TODO reword the usage text, document + local shell = require "prosody.util.prosodyctl.shell"; + arg[1] = arg[1]:match("^mod_(.*)"); -- strip mod_ prefix + table.insert(arg, 1, "module"); + table.insert(arg, 2, "reload"); + return shell.shell(arg); + end + service_command_warning("reload"); if not prosodyctl.isrunning() then |