mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Restore current_host and use only one backup path for it
This commit is contained in:
parent
5af988052d
commit
689b390342
3 changed files with 7 additions and 8 deletions
|
@ -1,7 +1,4 @@
|
|||
backup_dir="$1/conf/ynh/"
|
||||
backup_dir_legacy="$1/yunohost/"
|
||||
backup_dir="$1/conf/ynh"
|
||||
sudo mkdir -p $backup_dir
|
||||
sudo mkdir -p $backup_dir_legacy
|
||||
|
||||
sudo cp -a /etc/yunohost/current_host $backup_dir
|
||||
sudo cp -a /etc/yunohost/current_host $backup_dir_legacy
|
||||
sudo cp -a /etc/yunohost/current_host "${backup_dir}/current_host"
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
backup_dir="$1/conf/ynh"
|
||||
|
||||
sudo cp -a "${backup_dir}/current_host" /etc/yunohost/current_host
|
||||
|
|
|
@ -375,11 +375,11 @@ def backup_restore(auth, name, hooks=[], ignore_hooks=False,
|
|||
else:
|
||||
# Retrieve the domain from the backup
|
||||
try:
|
||||
with open("%s/yunohost/current_host" % tmp_dir, 'r') as f:
|
||||
with open("%s/conf/ynh/current_host" % tmp_dir, 'r') as f:
|
||||
domain = f.readline().rstrip()
|
||||
except IOError:
|
||||
logger.debug("unable to retrieve domain from "
|
||||
"'%s/yunohost/current_host'", tmp_dir, exc_info=1)
|
||||
logger.debug("unable to retrieve current_host from the backup",
|
||||
exc_info=1)
|
||||
raise MoulinetteError(errno.EIO, m18n.n('backup_invalid_archive'))
|
||||
|
||||
logger.debug("executing the post-install...")
|
||||
|
|
Loading…
Add table
Reference in a new issue