mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
sharing: Completely uninstall app
Test: Functional tests passed Signed-off-by: nbenedek <contact@nbenedek.me> [sunil: Update docstrings, make uninstall fail-safe] Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
95e370a1bf
commit
77318806c2
@ -55,3 +55,8 @@ class SharingApp(app_module.App):
|
|||||||
super().setup(old_version)
|
super().setup(old_version)
|
||||||
privileged.setup()
|
privileged.setup()
|
||||||
self.enable()
|
self.enable()
|
||||||
|
|
||||||
|
def uninstall(self):
|
||||||
|
"""De-configure and uninstall the app."""
|
||||||
|
super().uninstall()
|
||||||
|
privileged.uninstall()
|
||||||
|
|||||||
@ -173,3 +173,9 @@ def _list(aug=None):
|
|||||||
def list_shares() -> list[dict[str, object]]:
|
def list_shares() -> list[dict[str, object]]:
|
||||||
"""List all Apache configuration shares and print as JSON."""
|
"""List all Apache configuration shares and print as JSON."""
|
||||||
return _list()
|
return _list()
|
||||||
|
|
||||||
|
|
||||||
|
@privileged
|
||||||
|
def uninstall():
|
||||||
|
"""Remove apache config when app is uninstalled."""
|
||||||
|
pathlib.Path(APACHE_CONFIGURATION).unlink(missing_ok=True)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user