diff --git a/data/hooks/backup/40-conf_ynh_currenthost b/data/hooks/backup/40-conf_ynh_settings similarity index 70% rename from data/hooks/backup/40-conf_ynh_currenthost rename to data/hooks/backup/40-conf_ynh_settings index 6a98fd0d2..5b66da722 100755 --- a/data/hooks/backup/40-conf_ynh_currenthost +++ b/data/hooks/backup/40-conf_ynh_settings @@ -11,3 +11,4 @@ backup_dir="${1}/conf/ynh" # Backup the configuration ynh_backup "/etc/yunohost/current_host" "${backup_dir}/current_host" +[ ! -e "/etc/yunohost/settings.json" ] || ynh_backup "/etc/yunohost/settings.json" "${backup_dir}/settings.json" diff --git a/data/hooks/restore/40-conf_ynh_currenthost b/data/hooks/restore/40-conf_ynh_currenthost deleted file mode 100644 index 700e806b4..000000000 --- a/data/hooks/restore/40-conf_ynh_currenthost +++ /dev/null @@ -1,3 +0,0 @@ -backup_dir="$1/conf/ynh" - -cp -a "${backup_dir}/current_host" /etc/yunohost/current_host diff --git a/data/hooks/restore/40-conf_ynh_settings b/data/hooks/restore/40-conf_ynh_settings new file mode 100644 index 000000000..3bfa63162 --- /dev/null +++ b/data/hooks/restore/40-conf_ynh_settings @@ -0,0 +1,4 @@ +backup_dir="$1/conf/ynh" + +cp -a "${backup_dir}/current_host" /etc/yunohost/current_host +[ ! -e "${backup_dir}/settings.json" ] || cp -a "${backup_dir}/settings.json" "/etc/yunohost/settings.json"