mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
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:
parent
3e98930f94
commit
75d6b667ba
@ -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')
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user