From 2499767aa5dd834e9cc73c1cdcae23b662fb06d3 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Wed, 26 Mar 2025 21:10:32 -0700 Subject: [PATCH] kiwix: Remove existing data directory before a restore operation Although there are no issues with kiwix like for calibre, it is the right way to do this. Tests: - Without patch, restore the app on testing from a backup on stable machine and notice that the data folder is owned by nobody:nogroup but files inside are owned by a kiwix-server-freedombox user and group. This is not ideal. - With patch, restore again notice that the library is accessible and all the files are owned by nobody:nogroup. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/kiwix/manifest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plinth/modules/kiwix/manifest.py b/plinth/modules/kiwix/manifest.py index 536bb30a1..cc0fcd7b1 100644 --- a/plinth/modules/kiwix/manifest.py +++ b/plinth/modules/kiwix/manifest.py @@ -16,7 +16,8 @@ backup = { 'data': { 'directories': ['/var/lib/private/kiwix-server-freedombox/'] }, - 'services': ['kiwix-server-freedombox'] + 'services': ['kiwix-server-freedombox'], + 'delete_before_restore': ['/var/lib/private/kiwix-server-freedombox/'] } tags = [