gitweb: Fix issue with service startup when gitweb is not enabled

When gitweb is installed and not enabled without any public repos, the
post_inst() method tries to enable gitweb-freedombox-auth.conf apache2
configuration. Due to new approach of symlinking configuration files only when
needed, the file is not found and startup of freedombox service fails.

Fix it by making sure that gitweb auth configuration is only enabled when app
itself is enabled.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
Sunil Mohan Adapa 2023-06-06 16:03:29 -07:00 committed by Veiko Aasa
parent 2b355e2ddd
commit 478ec3b1d3
No known key found for this signature in database
GPG Key ID: 478539CAE680674E

View File

@ -98,7 +98,7 @@ class GitwebApp(app_module.App):
def post_init(self):
"""Perform post initialization operations."""
if not self.needs_setup():
if not self.needs_setup() and self.is_enabled():
self.update_service_access()
def set_shortcut_login_required(self, login_required):