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 2023-05-16 11:23:40 -07:00 committed by James Valleroy
parent ad13211f7e
commit 13db2c2372
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
5 changed files with 12 additions and 1 deletions

View File

@ -87,3 +87,6 @@ rm_conffile /etc/plinth/modules-enabled/users 23.10~
rm_conffile /etc/plinth/modules-enabled/wireguard 23.10~
rm_conffile /etc/plinth/modules-enabled/wordpress 23.10~
rm_conffile /etc/plinth/modules-enabled/zoph 23.10~
rm_conffile /etc/gitweb-freedombox.conf 23.10~
rm_conffile /etc/apache2/conf-available/gitweb-freedombox.conf 23.10~
rm_conffile /etc/apache2/conf-available/gitweb-freedombox-auth.conf 23.10~

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)