radicale: Create collections folder before starting uwsgi

Workaround for https://bugs.debian.org/919339

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
James Valleroy 2019-01-14 20:32:44 -05:00
parent 3e98930f94
commit 75d6b667ba
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
2 changed files with 5 additions and 3 deletions

View File

@ -20,6 +20,7 @@ Configuration helper for Radicale.
"""
import argparse
import os
import augeas
@ -89,8 +90,9 @@ def subcommand_configure(arguments):
def subcommand_enable(_):
"""Start service."""
if radicale.get_package_version() >= radicale.VERSION_2:
# Enable uwsgi for radicale 2.x. Do this after radicale is
# started, so it creates the necessary folders.
# Workaround for bug in radicale's uwsgi script (#919339)
if not os.path.exists('/var/lib/radicale/collections'):
os.makedirs('/var/lib/radicale/collections')
action_utils.service_disable('radicale')
action_utils.uwsgi_enable('radicale')
action_utils.webserver_enable('proxy_uwsgi', kind='module')

View File

@ -249,7 +249,7 @@ class WebserverChange(object):
def uwsgi_is_enabled(config_name):
"""Return whether a config is enabled in Radicale."""
"""Return whether a uwsgi config is enabled."""
enabled_path = UWSGI_ENABLED_PATH.format(config_name=config_name)
return os.path.exists(enabled_path)