mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[enh] Set YNH_APP_BACKUP_DIR env var for backup/restore scripts
This commit is contained in:
parent
205d6db7bd
commit
fd6bd9a348
1 changed files with 2 additions and 0 deletions
|
@ -217,6 +217,7 @@ def backup_create(name=None, description=None, output_directory=None,
|
|||
env_dict["YNH_APP_ID"] = app_id
|
||||
env_dict["YNH_APP_INSTANCE_NAME"] = app_instance_name
|
||||
env_dict["YNH_APP_INSTANCE_NUMBER"] = str(app_instance_nb)
|
||||
env_dict["YNH_APP_BACKUP_DIR"] = tmp_app_bkp_dir
|
||||
|
||||
hook_exec(tmp_script, args=[tmp_app_bkp_dir, app_instance_name],
|
||||
raise_on_error=True, chdir=tmp_app_bkp_dir, env=env_dict)
|
||||
|
@ -485,6 +486,7 @@ def backup_restore(auth, name, hooks=[], ignore_hooks=False,
|
|||
env_dict["YNH_APP_ID"] = app_id
|
||||
env_dict["YNH_APP_INSTANCE_NAME"] = app_instance_name
|
||||
env_dict["YNH_APP_INSTANCE_NUMBER"] = str(app_instance_nb)
|
||||
env_dict["YNH_APP_BACKUP_DIR"] = tmp_app_bkp_dir
|
||||
|
||||
hook_exec(tmp_script, args=[tmp_app_bkp_dir, app_instance_name],
|
||||
raise_on_error=True, chdir=tmp_app_bkp_dir, env=env_dict)
|
||||
|
|
Loading…
Add table
Reference in a new issue