From 23f7497c05d641b40a5571b00384aea37a97d4f2 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Tue, 16 May 2023 12:03:59 -0700 Subject: [PATCH] radicale: Use drop-in config component for /etc files Tests: - Config files are all symlinks in /etc/ - Web interface works. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- debian/freedombox.maintscript | 1 + plinth/modules/radicale/__init__.py | 8 +++++++- .../etc/apache2/conf-available/radicale2-freedombox.conf | 0 3 files changed, 8 insertions(+), 1 deletion(-) rename plinth/modules/radicale/data/{ => usr/share/freedombox}/etc/apache2/conf-available/radicale2-freedombox.conf (100%) diff --git a/debian/freedombox.maintscript b/debian/freedombox.maintscript index 26410a4b4..f4bb458bd 100644 --- a/debian/freedombox.maintscript +++ b/debian/freedombox.maintscript @@ -123,3 +123,4 @@ rm_conffile /etc/apache2/conf-available/minidlna-freedombox.conf 23.10~ rm_conffile /etc/NetworkManager/dispatcher.d/10-freedombox-batman 23.10~ rm_conffile /etc/pagekite.d/90_freedombox_certs.rc 23.10~ rm_conffile /etc/dpkg/origins/freedombox 23.10~ +rm_conffile /etc/apache2/conf-available/radicale2-freedombox.conf 23.10~ diff --git a/plinth/modules/radicale/__init__.py b/plinth/modules/radicale/__init__.py index 372addf5c..0dc219af4 100644 --- a/plinth/modules/radicale/__init__.py +++ b/plinth/modules/radicale/__init__.py @@ -10,6 +10,7 @@ from django.utils.translation import gettext_lazy as _ from plinth import app as app_module from plinth import cfg, frontpage, menu +from plinth.config import DropinConfigs from plinth.modules.apache.components import Uwsgi, Webserver from plinth.modules.backups.components import BackupRestore from plinth.modules.firewall.components import Firewall @@ -42,7 +43,7 @@ class RadicaleApp(app_module.App): app_id = 'radicale' - _version = 2 + _version = 3 def __init__(self): """Create components for the app.""" @@ -71,6 +72,11 @@ class RadicaleApp(app_module.App): packages = Packages('packages-radicale', ['radicale']) self.add(packages) + dropin_configs = DropinConfigs('dropin-configs-radicale', [ + '/etc/apache2/conf-available/radicale2-freedombox.conf', + ]) + self.add(dropin_configs) + firewall = Firewall('firewall-radicale', info.name, ports=['http', 'https'], is_external=True) self.add(firewall) diff --git a/plinth/modules/radicale/data/etc/apache2/conf-available/radicale2-freedombox.conf b/plinth/modules/radicale/data/usr/share/freedombox/etc/apache2/conf-available/radicale2-freedombox.conf similarity index 100% rename from plinth/modules/radicale/data/etc/apache2/conf-available/radicale2-freedombox.conf rename to plinth/modules/radicale/data/usr/share/freedombox/etc/apache2/conf-available/radicale2-freedombox.conf