From 8ad384af08177fe49e1760128f19bacbef73b301 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 31 May 2019 17:01:22 +0200 Subject: prosody: Log shutdown reason --- prosody | 1 + 1 file changed, 1 insertion(+) (limited to 'prosody') diff --git a/prosody b/prosody index 204fb36d..f0061bf1 100755 --- a/prosody +++ b/prosody @@ -90,6 +90,7 @@ end loop(); prosody.log("info", "Shutting down..."); +prosody.log("debug", "Shutdown reason is: %s", prosody.shutdown_reason or "not specified"); cleanup(); prosody.events.fire_event("server-stopped"); prosody.log("info", "Shutdown complete"); -- cgit v1.2.3 From 132dc809762a15b4c1c638ea0345bf7358caa833 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 31 May 2019 18:50:13 +0200 Subject: prosody: Log shutdown reason (in past tense) as the very last thing --- prosody | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'prosody') diff --git a/prosody b/prosody index f0061bf1..ced319e0 100755 --- a/prosody +++ b/prosody @@ -90,9 +90,9 @@ end loop(); prosody.log("info", "Shutting down..."); -prosody.log("debug", "Shutdown reason is: %s", prosody.shutdown_reason or "not specified"); cleanup(); prosody.events.fire_event("server-stopped"); prosody.log("info", "Shutdown complete"); +prosody.log("debug", "Shutdown reason was: %s", prosody.shutdown_reason or "not specified"); os.exit(prosody.shutdown_code); -- cgit v1.2.3 From b6b8c443ca10aea6aae5f8bb0596b8b4a9030f42 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 31 May 2019 18:50:34 +0200 Subject: prosody: Also log status code passed to exit() Sometimes you're just too lazy to `echo $?` --- prosody | 1 + 1 file changed, 1 insertion(+) (limited to 'prosody') diff --git a/prosody b/prosody index ced319e0..e82318d1 100755 --- a/prosody +++ b/prosody @@ -95,4 +95,5 @@ prosody.events.fire_event("server-stopped"); prosody.log("info", "Shutdown complete"); prosody.log("debug", "Shutdown reason was: %s", prosody.shutdown_reason or "not specified"); +prosody.log("debug", "Exiting with status code: %d", prosody.shutdown_code or 0); os.exit(prosody.shutdown_code); -- cgit v1.2.3