mirror of
https://github.com/YunoHost-Apps/seafile_ynh.git
synced 2024-09-03 20:26:01 +02:00
Fix upgrade regession
This commit is contained in:
parent
c56de31105
commit
9ed20af7f3
4 changed files with 10 additions and 11 deletions
|
@ -19,7 +19,7 @@
|
||||||
upgrade=1
|
upgrade=1
|
||||||
upgrade=1 from_commit=db11d890922564dfdcb7937a3a682957082fbb31
|
upgrade=1 from_commit=db11d890922564dfdcb7937a3a682957082fbb31
|
||||||
upgrade=1 from_commit=67e0869de25f4f58710c3d30d5533356745ea676
|
upgrade=1 from_commit=67e0869de25f4f58710c3d30d5533356745ea676
|
||||||
upgrade=1 from_commit=637a32aa57bc2dc6421e0e79d52862f0924be1cf
|
upgrade=1 from_commit=6786d9f65e60b2d2a96b9ea4c43897dde3a66199
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=0
|
multi_instance=0
|
||||||
wrong_user=1
|
wrong_user=1
|
||||||
|
@ -36,5 +36,5 @@
|
||||||
name=Version 6.3.4 - branch Old_version_for_CI_3
|
name=Version 6.3.4 - branch Old_version_for_CI_3
|
||||||
; commit=67e0869de25f4f58710c3d30d5533356745ea676
|
; commit=67e0869de25f4f58710c3d30d5533356745ea676
|
||||||
name=Before move main dir to opt - branch Old_version_for_CI_2
|
name=Before move main dir to opt - branch Old_version_for_CI_2
|
||||||
; commit=637a32aa57bc2dc6421e0e79d52862f0924be1cf
|
; commit=6786d9f65e60b2d2a96b9ea4c43897dde3a66199
|
||||||
name=The oldest installable version - branch Old_version_for_CI
|
name=The oldest installable version - branch Old_version_for_CI
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
"mysql"
|
"mysql"
|
||||||
],
|
],
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 4.0"
|
"yunohost": ">= 4.1"
|
||||||
},
|
},
|
||||||
"arguments": {
|
"arguments": {
|
||||||
"install": [
|
"install": [
|
||||||
|
|
|
@ -26,7 +26,6 @@ seafile_data=/home/yunohost.app/seafile-data
|
||||||
final_path=/opt/yunohost/$app
|
final_path=/opt/yunohost/$app
|
||||||
seafile_user=$app
|
seafile_user=$app
|
||||||
admin_password=$YNH_APP_ARG_ADMIN_PASSWORD
|
admin_password=$YNH_APP_ARG_ADMIN_PASSWORD
|
||||||
# TODO User env variable in 4.1
|
|
||||||
seafile_version=$(ynh_app_upstream_version)
|
seafile_version=$(ynh_app_upstream_version)
|
||||||
|
|
||||||
# Create special path with / at the end
|
# Create special path with / at the end
|
||||||
|
@ -68,7 +67,6 @@ ynh_app_setting_set --app $app --key seahub_port --value $seahub_port
|
||||||
ynh_app_setting_set --app $app --key fileserver_port --value $fileserver_port
|
ynh_app_setting_set --app $app --key fileserver_port --value $fileserver_port
|
||||||
ynh_app_setting_set --app $app --key webdav_port --value $webdav_port
|
ynh_app_setting_set --app $app --key webdav_port --value $webdav_port
|
||||||
ynh_app_setting_set --app $app --key is_public --value $is_public
|
ynh_app_setting_set --app $app --key is_public --value $is_public
|
||||||
ynh_app_setting_set --app $app --key installed_version --value $seafile_version
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD MODIFICATIONS
|
# STANDARD MODIFICATIONS
|
||||||
|
|
|
@ -19,16 +19,19 @@ ynh_script_progression --message="Loading installation settings..."
|
||||||
# Retrieve arguments
|
# Retrieve arguments
|
||||||
domain=$(ynh_app_setting_get --app $app --key domain)
|
domain=$(ynh_app_setting_get --app $app --key domain)
|
||||||
path_url=$(ynh_normalize_url_path --path_url $(ynh_app_setting_get --app $app --key path))
|
path_url=$(ynh_normalize_url_path --path_url $(ynh_app_setting_get --app $app --key path))
|
||||||
installed_version=$(ynh_app_setting_get --app $app --key installed_version)
|
|
||||||
seahub_port=$(ynh_app_setting_get --app $app --key seahub_port)
|
seahub_port=$(ynh_app_setting_get --app $app --key seahub_port)
|
||||||
fileserver_port=$(ynh_app_setting_get --app $app --key fileserver_port)
|
fileserver_port=$(ynh_app_setting_get --app $app --key fileserver_port)
|
||||||
webdav_port=$(ynh_app_setting_get --app $app --key webdav_port)
|
webdav_port=$(ynh_app_setting_get --app $app --key webdav_port)
|
||||||
final_path=$(ynh_app_setting_get --app $app --key final_path)
|
final_path=$(ynh_app_setting_get --app $app --key final_path)
|
||||||
seafile_user=$app
|
seafile_user=$app
|
||||||
seafile_data=/home/yunohost.app/seafile-data
|
seafile_data=/home/yunohost.app/seafile-data
|
||||||
# TODO User env variable in 4.1
|
installed_version=${YNH_APP_CURRENT_VERSION/*~ynh/}
|
||||||
seafile_version=$(ynh_app_upstream_version)
|
seafile_version=$(ynh_app_upstream_version)
|
||||||
|
|
||||||
|
if [ "$YNH_APP_CURRENT_VERSION" == '-' ]; then
|
||||||
|
YNH_APP_CURRENT_VERSION="6.0.9~ynh0"
|
||||||
|
fi
|
||||||
|
|
||||||
ynh_script_progression --message="Stoping services..."
|
ynh_script_progression --message="Stoping services..."
|
||||||
|
|
||||||
# stop seafile server
|
# stop seafile server
|
||||||
|
@ -51,7 +54,8 @@ pkill -f seahub || true
|
||||||
|
|
||||||
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=30
|
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=30
|
||||||
# Backup the current version of the app
|
# Backup the current version of the app
|
||||||
if [ "0$(ynh_app_setting_get --app=$app --key=disable_backup_before_upgrade)" -ne 1 ]
|
if [ "0$(ynh_app_setting_get --app=$app --key=disable_backup_before_upgrade)" -ne 1 ] \
|
||||||
|
&& (ynh_compare_current_package_version --comparison=ge --version='7.0.5~ynh1')
|
||||||
then
|
then
|
||||||
ynh_backup_before_upgrade
|
ynh_backup_before_upgrade
|
||||||
ynh_clean_setup () {
|
ynh_clean_setup () {
|
||||||
|
@ -315,7 +319,4 @@ do
|
||||||
ynh_secure_remove --file=$final_path/$f
|
ynh_secure_remove --file=$final_path/$f
|
||||||
done
|
done
|
||||||
|
|
||||||
# store new installed version
|
|
||||||
ynh_app_setting_set --app $app --key installed_version --value $seafile_version
|
|
||||||
|
|
||||||
ynh_script_progression --message="Upgrade of $app completed" --last
|
ynh_script_progression --message="Upgrade of $app completed" --last
|
||||||
|
|
Loading…
Add table
Reference in a new issue