shaarli: Utilize purging of packages and don't remove explicitly

Tests:

- Uninstall shaarli and notice that /var/lib/shaarli directory has been removed.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2023-06-06 10:18:21 -07:00 committed by James Valleroy
parent dd199fbfad
commit 5be1b1ad2b
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
2 changed files with 1 additions and 18 deletions

View File

@ -12,7 +12,7 @@ from plinth.modules.backups.components import BackupRestore
from plinth.modules.firewall.components import Firewall
from plinth.package import Packages
from . import manifest, privileged
from . import manifest
_description = [
_('Shaarli allows you to save and share bookmarks.'),
@ -69,8 +69,3 @@ class ShaarliApp(app_module.App):
"""Install and configure the app."""
super().setup(old_version)
self.enable()
def uninstall(self):
"""De-configure and uninstall the app."""
super().uninstall()
privileged.uninstall()

View File

@ -1,12 +0,0 @@
# 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)