mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
radicale: Switch to uwsgi for radicale 2.x
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
3 files changed
+18
-3
No files matched your search
@@ -22,13 +22,20 @@ Configuration helper for Radicale.
|
||||
|
||||
import argparse
|
||||
import augeas
|
||||
import os
|
||||
import subprocess
|
||||
from distutils.version import LooseVersion as LV
|
||||
|
||||
from plinth import action_utils
|
||||
|
||||
CONFIG_FILE = '/etc/radicale/config'
|
||||
|
||||
DEFAULT_FILE = '/etc/default/radicale'
|
||||
|
||||
UWSGI_FILE = '/etc/uwsgi/apps-available/radicale.ini'
|
||||
|
||||
UWSGI_LINK = '/etc/uwsgi/apps-enabled/radicale.ini'
|
||||
|
||||
VERSION_2 = LV('2')
|
||||
|
||||
|
||||
@@ -79,6 +86,14 @@ def subcommand_setup(_):
|
||||
action_utils.service_restart('radicale')
|
||||
action_utils.webserver_enable(_get_web_config(current_version))
|
||||
|
||||
# Enable uwsgi for radicale 2.x. Do this after radicale is
|
||||
# started, so it creates the necessary folders.
|
||||
if current_version and current_version >= VERSION_2:
|
||||
if not os.path.exists(UWSGI_LINK):
|
||||
os.symlink(UWSGI_FILE, UWSGI_LINK)
|
||||
action_utils.webserver_enable('proxy_uwsgi', kind='module')
|
||||
action_utils.service_restart('uwsgi')
|
||||
|
||||
|
||||
def subcommand_configure(arguments):
|
||||
"""Sets the radicale rights type to a particular value"""
|
||||
|
||||
Reference in new issue
Block a user