mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +00:00
shadowsocks: 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
6ab0be6f9a
commit
95e370a1bf
@ -84,3 +84,8 @@ class ShadowsocksApp(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()
|
||||||
|
|||||||
@ -95,3 +95,10 @@ def merge_config(config: dict[str, Union[int, str]]):
|
|||||||
from . import ShadowsocksApp
|
from . import ShadowsocksApp
|
||||||
if action_utils.service_is_enabled(ShadowsocksApp.DAEMON):
|
if action_utils.service_is_enabled(ShadowsocksApp.DAEMON):
|
||||||
action_utils.service_restart(ShadowsocksApp.DAEMON)
|
action_utils.service_restart(ShadowsocksApp.DAEMON)
|
||||||
|
|
||||||
|
|
||||||
|
@privileged
|
||||||
|
def uninstall():
|
||||||
|
"""Remove configuration files."""
|
||||||
|
for path in SHADOWSOCKS_CONFIG_SYMLINK, SHADOWSOCKS_CONFIG_ACTUAL:
|
||||||
|
pathlib.Path(path).unlink(missing_ok=True)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user