diff --git a/debian/freedombox.maintscript b/debian/freedombox.maintscript index 5727e68f5..f8edf65bd 100644 --- a/debian/freedombox.maintscript +++ b/debian/freedombox.maintscript @@ -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~ diff --git a/plinth/modules/gitweb/__init__.py b/plinth/modules/gitweb/__init__.py index 1d438fb9e..63cdf13f7 100644 --- a/plinth/modules/gitweb/__init__.py +++ b/plinth/modules/gitweb/__init__.py @@ -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) diff --git a/plinth/modules/gitweb/data/etc/apache2/conf-available/gitweb-freedombox-auth.conf b/plinth/modules/gitweb/data/usr/share/freedombox/etc/apache2/conf-available/gitweb-freedombox-auth.conf similarity index 100% rename from plinth/modules/gitweb/data/etc/apache2/conf-available/gitweb-freedombox-auth.conf rename to plinth/modules/gitweb/data/usr/share/freedombox/etc/apache2/conf-available/gitweb-freedombox-auth.conf diff --git a/plinth/modules/gitweb/data/etc/apache2/conf-available/gitweb-freedombox.conf b/plinth/modules/gitweb/data/usr/share/freedombox/etc/apache2/conf-available/gitweb-freedombox.conf similarity index 100% rename from plinth/modules/gitweb/data/etc/apache2/conf-available/gitweb-freedombox.conf rename to plinth/modules/gitweb/data/usr/share/freedombox/etc/apache2/conf-available/gitweb-freedombox.conf diff --git a/plinth/modules/gitweb/data/etc/gitweb-freedombox.conf b/plinth/modules/gitweb/data/usr/share/freedombox/etc/gitweb-freedombox.conf similarity index 100% rename from plinth/modules/gitweb/data/etc/gitweb-freedombox.conf rename to plinth/modules/gitweb/data/usr/share/freedombox/etc/gitweb-freedombox.conf