Changeset

11062:dd3b1b9d867d

mod_posix: Daemonize later Daemonizing later means we can use that as a "successful startup" signal and problems can be reported via exit code.
author Kim Alvefur <zash@zash.se>
date Tue, 08 Sep 2020 22:50:43 +0200
parents 11060:19dd9522f107
children 11064:af1e3b7d9ea3
files plugins/mod_posix.lua
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_posix.lua	Thu Sep 03 13:10:46 2020 +0100
+++ b/plugins/mod_posix.lua	Tue Sep 08 22:50:43 2020 +0200
@@ -117,9 +117,7 @@
 			write_pidfile();
 		end
 	end
-	if not prosody.start_time then -- server-starting
-		daemonize_server();
-	end
+	module:hook("server-started", daemonize_server)
 else
 	-- Not going to daemonize, so write the pid of this process
 	write_pidfile();