From b70cff29f78d1da4d2c48c93457b7c33db8e78b0 Mon Sep 17 00:00:00 2001 From: zamentur Date: Mon, 8 Feb 2016 22:39:17 +0100 Subject: [PATCH] [fix] Backup/restore without postinstall failed --- data/hooks/backup/40-conf_ynh_currenthost | 7 +++++++ data/hooks/restore/40-conf_ynh_currenthost | 1 + 2 files changed, 8 insertions(+) create mode 100644 data/hooks/backup/40-conf_ynh_currenthost create mode 100644 data/hooks/restore/40-conf_ynh_currenthost diff --git a/data/hooks/backup/40-conf_ynh_currenthost b/data/hooks/backup/40-conf_ynh_currenthost new file mode 100644 index 000000000..a91a50001 --- /dev/null +++ b/data/hooks/backup/40-conf_ynh_currenthost @@ -0,0 +1,7 @@ +backup_dir="$1/conf/ynh/" +backup_dir_legacy="$1/yunohost/" +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 diff --git a/data/hooks/restore/40-conf_ynh_currenthost b/data/hooks/restore/40-conf_ynh_currenthost new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/data/hooks/restore/40-conf_ynh_currenthost @@ -0,0 +1 @@ +