mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
apps: remove /var/log/$app during app_remove if --purge is used
This commit is contained in:
parent
0c319cbeba
commit
8c376c2ae4
1 changed files with 3 additions and 0 deletions
|
@ -1486,6 +1486,9 @@ def app_remove(operation_logger, app, purge=False, force_workdir=None):
|
|||
for permission_name in user_permission_list(apps=[app])["permissions"].keys():
|
||||
permission_delete(permission_name, force=True, sync_perm=False)
|
||||
|
||||
if purge and os.path.exists(f"/var/log/{app}"):
|
||||
shutil.rmtree(f"/var/log/{app}")
|
||||
|
||||
if os.path.exists(app_setting_path):
|
||||
shutil.rmtree(app_setting_path)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue