mod_admin_shell: Allow passing an exit code to server:shutdown()
authorKim Alvefur <zash@zash.se>
Thu, 30 Sep 2021 23:22:51 +0200
changeset 11835 94cd363116a3
parent 11834 7fe2fbfbdb1c
child 11836 30ca1be53829
mod_admin_shell: Allow passing an exit code to server:shutdown() Mirroring the internal API
plugins/mod_admin_shell.lua
--- a/plugins/mod_admin_shell.lua	Thu Sep 30 23:22:07 2021 +0200
+++ b/plugins/mod_admin_shell.lua	Thu Sep 30 23:22:51 2021 +0200
@@ -330,8 +330,8 @@
 		minutes, (minutes ~= 1 and "s") or "", os.date("%c", prosody.start_time));
 end
 
-function def_env.server:shutdown(reason)
-	prosody.shutdown(reason);
+function def_env.server:shutdown(reason, code)
+	prosody.shutdown(reason, code);
 	return true, "Shutdown initiated";
 end