cockpit: Use drop-in config component for /etc files

Tests:

- Config files are all symlinks in /etc/
- Web interface is available

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2023-05-16 14:00:09 -07:00 committed by James Valleroy
parent 98be58eb41
commit 87a45e1716
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
3 changed files with 8 additions and 1 deletions

View File

@ -92,6 +92,7 @@ rm_conffile /etc/fail2ban/jail.d/apache-auth-freedombox.conf 23.10~
rm_conffile /etc/apache2/conf-available/bepasty-freedombox.conf 23.10~
rm_conffile /etc/uwsgi/apps-available/bepasty-freedombox.ini 23.10~
rm_conffile /etc/apache2/conf-available/calibre-freedombox.conf 23.10~
rm_conffile /etc/apache2/conf-available/cockpit-freedombox.conf 23.10~
rm_conffile /etc/apache2/conf-available/deluge-plinth.conf 23.10~
rm_conffile /etc/dovecot/conf.d/15-freedombox-mail.conf 23.10~
rm_conffile /etc/dovecot/conf.d/05-freedombox-passdb.conf 23.10~

View File

@ -8,6 +8,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.daemon import Daemon
from plinth.modules.apache.components import Webserver
from plinth.modules.backups.components import BackupRestore
@ -41,7 +42,7 @@ class CockpitApp(app_module.App):
app_id = 'cockpit'
_version = 2
_version = 3
def __init__(self):
"""Create components for the app."""
@ -72,6 +73,11 @@ class CockpitApp(app_module.App):
packages = Packages('packages-cockpit', ['cockpit'])
self.add(packages)
dropin_configs = DropinConfigs('dropin-configs-cockpit', [
'/etc/apache2/conf-available/cockpit-freedombox.conf',
])
self.add(dropin_configs)
firewall = Firewall('firewall-cockpit', info.name,
ports=['http', 'https'], is_external=True)
self.add(firewall)