diff --git a/check_process b/check_process index e5e6e8d..3bb4ffc 100644 --- a/check_process +++ b/check_process @@ -10,7 +10,7 @@ setup_private=0 setup_public=0 upgrade=1 - #upgrade=1 from_commit=CommitHash + upgrade=1 from_commit=b50d8bc6c1401fadfcf2de701ec490d7ec05b9f0 backup_restore=1 multi_instance=0 port_already_use=0 diff --git a/scripts/upgrade b/scripts/upgrade index 3b1cea5..a0f9261 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -96,6 +96,17 @@ tempdir="$(mktemp -d)" ynh_setup_source --dest_dir=$tempdir --source_id=$architecture ynh_exec_warn_less dpkg -i $tempdir/duniter-server-v1.8.*-linux-*.deb +#================================================= +# MOVE DUNITER DIRECTORY +#================================================= +if [[ ! -d "${datadir}" ]]; then + ynh_script_progression --message="Moving data directory…" + mv /root/.config/duniter $datadir + chmod 750 "$datadir" + chmod -R o-rwx "$datadir" + chown -R $app:www-data "$datadir" +fi + #================================================= # UPDATE A CONFIG FILE #=================================================