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/05-conf_ldap b/data/hooks/restore/05-conf_ldap index 20551761a..7470f6eef 100644 --- a/data/hooks/restore/05-conf_ldap +++ b/data/hooks/restore/05-conf_ldap @@ -10,6 +10,7 @@ if [[ $EUID -ne 0 ]]; then sudo /bin/bash $(readlink -f $0) $1 else + service slapd stop || true # Create a directory for backup 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 @@ +