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 authored and Veiko Aasa committed 2023-06-09 19:42:17 +03:00
1 parent 2b355e2ddd
commit 478ec3b1d3
1 file changed
+1 -1
+1 -1
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):