Daemonize after creation of network sockets
The original process should exit after the server is ready. See also https://www.freedesktop.org/software/systemd/man/daemon.html#SysV%20Daemons
This commit is contained in:
parent
360e88f350
commit
fcccb3f7af
@ -158,7 +158,6 @@ def daemonize(configuration, logger):
|
|||||||
|
|
||||||
def serve(configuration, logger):
|
def serve(configuration, logger):
|
||||||
"""Serve radicale from configuration."""
|
"""Serve radicale from configuration."""
|
||||||
daemonize(configuration, logger)
|
|
||||||
logger.info("Starting Radicale")
|
logger.info("Starting Radicale")
|
||||||
|
|
||||||
# Create collection servers
|
# Create collection servers
|
||||||
@ -234,6 +233,7 @@ def serve(configuration, logger):
|
|||||||
else:
|
else:
|
||||||
# Fallback to busy waiting
|
# Fallback to busy waiting
|
||||||
select_timeout = 1.0
|
select_timeout = 1.0
|
||||||
|
daemonize(configuration, logger)
|
||||||
logger.debug("Radicale server ready")
|
logger.debug("Radicale server ready")
|
||||||
while not shutdown_program:
|
while not shutdown_program:
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user