mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-25 08:43:36 +00:00
* remove data directory when app is uninstalled Tests: 1. Install and configure the app 2. Reinstall app and confirm the initial setup page is shown Signed-off-by: nbenedek <contact@nbenedek.me> [sunil: Update docstrings, make uninstall fail-safe] [sunil: Fix uninstall test by setting up after reinstall] Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
13 lines
261 B
Python
13 lines
261 B
Python
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
"""Configure Shaarli."""
|
|
|
|
import shutil
|
|
|
|
from plinth.actions import privileged
|
|
|
|
|
|
@privileged
|
|
def uninstall():
|
|
"""Remove Shaarli's data directory."""
|
|
shutil.rmtree('/var/lib/shaarli/data', ignore_errors=True)
|