mirror of
https://github.com/YunoHost-Apps/duniter_ynh.git
synced 2024-09-03 18:26:35 +02:00
[fix] Add upgrade support datadir move
Upgrade from the state before the refactoring from 1.8.1~ynh0 to 1.8.2~ynh1 Move Duniter home directory to the YunoHost App path Check if the destination exists, meaning it’s not running < 1.8.1~ynh1 then run the datadir move Package_check: Add upgrade check from commit before the refactoring
This commit is contained in:
parent
71f08a3535
commit
ac485a5388
2 changed files with 12 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue