mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
Split the main run function to allow the use of radicale serving programatically. Add an extra_config parameter to the config load to override config.
This commit is contained in:
parent
383409213e
commit
a7549bc652
2 changed files with 10 additions and 1 deletions
|
@ -107,6 +107,11 @@ def run():
|
|||
if not configuration_found:
|
||||
logger.warning("Configuration file '%s' not found" % options.config)
|
||||
|
||||
serve(configuration, logger)
|
||||
|
||||
|
||||
def serve(configuration, logger):
|
||||
"""Serve radicale from configuration"""
|
||||
# Fork if Radicale is launched as daemon
|
||||
if configuration.getboolean("server", "daemon"):
|
||||
# Check and create PID file in a race-free manner
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue