mirror of
https://github.com/YunoHost-Apps/galene_ynh.git
synced 2024-09-03 18:36:31 +02:00
Fix upgrade from 0.6~ynh1 and before
This commit is contained in:
parent
15579b528e
commit
503fd4372d
2 changed files with 15 additions and 0 deletions
|
@ -16,6 +16,8 @@
|
|||
setup_public=1
|
||||
upgrade=1
|
||||
upgrade=1 from_commit=aaae7fbe83ce001fabd40509882e765a5d8da2c1
|
||||
# 0.6~ynh1
|
||||
upgrade=1 from_commit=c5cc50f1b1f326080f4f657b7805f2c27c1c3f20
|
||||
backup_restore=1
|
||||
multi_instance=0
|
||||
port_already_use=0
|
||||
|
|
|
@ -23,6 +23,7 @@ admin=$(ynh_app_setting_get --app=$app --key=admin)
|
|||
password=$(ynh_app_setting_get --app=$app --key=password)
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
group_name=$(ynh_app_setting_get --app=$app --key=group_name)
|
||||
group_description=$(ynh_app_setting_get --app=$app --key=group_description)
|
||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
ldap_port=$(ynh_app_setting_get --app=$app --key=ldap_port)
|
||||
key=$(ynh_app_setting_get --app=$app --key=key)
|
||||
|
@ -101,6 +102,18 @@ if [ -f "$final_path/data/passwd" ] ; then
|
|||
ynh_secure_remove --file="$final_path/data/passwd"
|
||||
fi
|
||||
|
||||
# For version 0.6~ynh1 and before
|
||||
if [[ ! -d "$final_path/live" ]]
|
||||
then
|
||||
tempdir="$(mktemp -d)"
|
||||
mv $final_path $tempdir
|
||||
mkdir -p "$final_path/live"
|
||||
mv $tempdir/$app/galene "$final_path/live/"
|
||||
mv $tempdir/$app/data/ "$final_path/live/"
|
||||
mv $tempdir/$app/static/ "$final_path/live/"
|
||||
ynh_secure_remove --file="$tempdir"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue