From 099e02102468baa4c9ba38bfba7a0d5ca41b0585 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Wed, 26 Jul 2023 18:25:15 -0700 Subject: [PATCH] bepasty: Don't enable app when setup is rerun Tests: - Rerun setup after disabling the app. App is not enabled. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/bepasty/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plinth/modules/bepasty/__init__.py b/plinth/modules/bepasty/__init__.py index ac0a47863..784650814 100644 --- a/plinth/modules/bepasty/__init__.py +++ b/plinth/modules/bepasty/__init__.py @@ -100,7 +100,9 @@ class BepastyApp(app_module.App): """Install and configure the app.""" super().setup(old_version) privileged.setup('freedombox.local') - self.enable() + if not old_version: + self.enable() + if old_version == 1 and not privileged.get_configuration().get( 'DEFAULT_PERMISSIONS'): # Upgrade to a better default only if user hasn't changed the