mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Pass app instance environment variables to remove script.
This commit is contained in:
parent
3f0ad9139e
commit
5027ec0468
1 changed files with 7 additions and 1 deletions
|
@ -608,7 +608,13 @@ def app_remove(auth, app):
|
|||
|
||||
args_list = [app]
|
||||
|
||||
if hook_exec('/tmp/yunohost_remove/scripts/remove', args_list) == 0:
|
||||
env_dict = {}
|
||||
app_id, app_instance_nb = _parse_app_instance_name(app)
|
||||
env_dict["YNH_APP_ID"] = app_id
|
||||
env_dict["YNH_APP_INSTANCE_NAME"] = app
|
||||
env_dict["YNH_APP_INSTANCE_NUMBER"] = str(app_instance_nb)
|
||||
|
||||
if hook_exec('/tmp/yunohost_remove/scripts/remove', args=args_list, env=env_dict) == 0:
|
||||
logger.success(m18n.n('app_removed', app=app))
|
||||
|
||||
if os.path.exists(app_setting_path): shutil.rmtree(app_setting_path)
|
||||
|
|
Loading…
Add table
Reference in a new issue