From e0685bbc44bcea1e76808849656b3f52a1c5c3b1 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Thu, 8 Oct 2026 11:42:12 -0700 Subject: [PATCH] homeassistant: Enable app properly on first install - When app is installed for the first time, the drop-in configuration file /etc/apache2/includes/home-assistant-freedombox.conf is not created properly. This is because app.enable() is not being called and not all components are enabled (including the drop-in configuration component). Fix this by calling app.enable() in setup(). - Ensure that apache2 is restarted after the homeassistant app is update to version 2 from version 1. Tests: - On a fresh VM, without the patch, installing HA does not result in working HA UI. With patch, on a fresh VM. It works. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- freedombox/modules/homeassistant/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/freedombox/modules/homeassistant/__init__.py b/freedombox/modules/homeassistant/__init__.py index 199dd5867..bb21641d5 100644 --- a/freedombox/modules/homeassistant/__init__.py +++ b/freedombox/modules/homeassistant/__init__.py @@ -97,7 +97,8 @@ class HomeAssistnatApp(app_module.App): self.add(firewall_local_protection) webserver = WebserverRoot('webserverroot-homeassistant', - 'home-assistant-freedombox') + 'home-assistant-freedombox', + last_updated_version=2) self.add(webserver) image_name = 'registry.freedombox.org/' \ @@ -138,3 +139,6 @@ class HomeAssistnatApp(app_module.App): super().setup(old_version) privileged.setup(old_version) + + if not old_version: + self.enable()