mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Fix -conf_ynh_settings backup/restore when /etc/yunohost/domains doesn't exist
This commit is contained in:
parent
044038d1c7
commit
38f5352fc0
2 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ backup_dir="${1}/conf/ynh"
|
||||||
# Backup the configuration
|
# Backup the configuration
|
||||||
ynh_backup "/etc/yunohost/firewall.yml" "${backup_dir}/firewall.yml"
|
ynh_backup "/etc/yunohost/firewall.yml" "${backup_dir}/firewall.yml"
|
||||||
ynh_backup "/etc/yunohost/current_host" "${backup_dir}/current_host"
|
ynh_backup "/etc/yunohost/current_host" "${backup_dir}/current_host"
|
||||||
ynh_backup "/etc/yunohost/domains" "${backup_dir}/domains"
|
[ ! -d "/etc/yunohost/domains" ] || ynh_backup "/etc/yunohost/domains" "${backup_dir}/domains"
|
||||||
[ ! -e "/etc/yunohost/settings.json" ] || ynh_backup "/etc/yunohost/settings.json" "${backup_dir}/settings.json"
|
[ ! -e "/etc/yunohost/settings.json" ] || ynh_backup "/etc/yunohost/settings.json" "${backup_dir}/settings.json"
|
||||||
[ ! -d "/etc/yunohost/dyndns" ] || ynh_backup "/etc/yunohost/dyndns" "${backup_dir}/dyndns"
|
[ ! -d "/etc/yunohost/dyndns" ] || ynh_backup "/etc/yunohost/dyndns" "${backup_dir}/dyndns"
|
||||||
[ ! -d "/etc/dkim" ] || ynh_backup "/etc/dkim" "${backup_dir}/dkim"
|
[ ! -d "/etc/dkim" ] || ynh_backup "/etc/dkim" "${backup_dir}/dkim"
|
||||||
|
|
|
@ -2,7 +2,7 @@ backup_dir="$1/conf/ynh"
|
||||||
|
|
||||||
cp -a "${backup_dir}/current_host" /etc/yunohost/current_host
|
cp -a "${backup_dir}/current_host" /etc/yunohost/current_host
|
||||||
cp -a "${backup_dir}/firewall.yml" /etc/yunohost/firewall.yml
|
cp -a "${backup_dir}/firewall.yml" /etc/yunohost/firewall.yml
|
||||||
cp -a "${backup_dir}/domains" /etc/yunohost/domains
|
[ ! -d "${backup_dir}/domains" ] || cp -a "${backup_dir}/domains" /etc/yunohost/domains
|
||||||
[ ! -e "${backup_dir}/settings.json" ] || cp -a "${backup_dir}/settings.json" "/etc/yunohost/settings.json"
|
[ ! -e "${backup_dir}/settings.json" ] || cp -a "${backup_dir}/settings.json" "/etc/yunohost/settings.json"
|
||||||
[ ! -d "${backup_dir}/dyndns" ] || cp -raT "${backup_dir}/dyndns" "/etc/yunohost/dyndns"
|
[ ! -d "${backup_dir}/dyndns" ] || cp -raT "${backup_dir}/dyndns" "/etc/yunohost/dyndns"
|
||||||
[ ! -d "${backup_dir}/dkim" ] || cp -raT "${backup_dir}/dkim" "/etc/dkim"
|
[ ! -d "${backup_dir}/dkim" ] || cp -raT "${backup_dir}/dkim" "/etc/dkim"
|
||||||
|
|
Loading…
Add table
Reference in a new issue