mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +00:00
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:
parent
dd199fbfad
commit
5be1b1ad2b
@ -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()
|
||||
|
||||
@ -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)
|
||||
Loading…
x
Reference in New Issue
Block a user