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

Tests:

- Config files are all symlinks /etc/
- Configuration file is effective
- Web interface works
- Web interface authentication works

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2023-06-05 20:27:32 -04:00
1 parent ad13211f7e
commit 13db2c2372
5 files changed
+12 -1

No files matched your search

+9 -1
View File
@@ -7,6 +7,7 @@ from django.utils.translation import gettext_lazy as _
from plinth import app as app_module
from plinth import frontpage, menu
from plinth.config import DropinConfigs
from plinth.modules.apache.components import Webserver
from plinth.modules.backups.components import BackupRestore
from plinth.modules.firewall.components import Firewall
@@ -35,7 +36,7 @@ class GitwebApp(app_module.App):
app_id = 'gitweb'
_version = 2
_version = 3
def __init__(self):
"""Create components for the app."""
@@ -68,6 +69,13 @@ class GitwebApp(app_module.App):
packages = Packages('packages-gitweb', ['gitweb', 'highlight'])
self.add(packages)
dropin_configs = DropinConfigs('dropin-configs-gitweb', [
'/etc/gitweb-freedombox.conf',
'/etc/apache2/conf-available/gitweb-freedombox.conf',
'/etc/apache2/conf-available/gitweb-freedombox-auth.conf'
])
self.add(dropin_configs)
firewall = Firewall('firewall-gitweb', info.name,
ports=['http', 'https'], is_external=True)
self.add(firewall)