mirror of
https://github.com/YunoHost-Apps/seafile_ynh.git
synced 2024-09-03 20:26:01 +02:00
Fix upgrade to 7.1
This commit is contained in:
parent
ac336efea4
commit
a2f13e12e8
4 changed files with 23 additions and 10 deletions
|
@ -88,6 +88,14 @@ From command line:
|
|||
|
||||
### Upgrade
|
||||
|
||||
By default a backup is made before the upgrade. To avoid this you have theses following possibilites:
|
||||
- Pass the `NO_BACKUP_UPGRADE` env variable with `1` at each upgrade. By example `NO_BACKUP_UPGRADE=1 yunohost app upgrade synapse`.
|
||||
- Set the settings `disable_backup_before_upgrade` to `1`. You can set this with this command:
|
||||
|
||||
`yunohost app setting synapse disable_backup_before_upgrade -v 1`
|
||||
|
||||
After this settings will be applied for **all** next upgrade.
|
||||
|
||||
From command line:
|
||||
|
||||
`yunohost app upgrade seafile`
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
#=================================================
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
[[ -e "../settings/manifest.json" ]] || [[ -e "../manifest.json" ]] && \
|
||||
seafile_version=$(ynh_app_upstream_version)
|
||||
|
||||
#=================================================
|
||||
# DEFINE ALL COMMON FONCTIONS
|
||||
|
|
|
@ -26,6 +26,8 @@ seafile_data=/home/yunohost.app/seafile-data
|
|||
final_path=/opt/yunohost/$app
|
||||
seafile_user=$app
|
||||
admin_password=$YNH_APP_ARG_ADMIN_PASSWORD
|
||||
# TODO User env variable in 4.1
|
||||
seafile_version=$(ynh_app_upstream_version)
|
||||
|
||||
# Create special path with / at the end
|
||||
if [[ $path_url == '/' ]]
|
||||
|
|
|
@ -25,6 +25,8 @@ fileserver_port=$(ynh_app_setting_get --app $app --key fileserver_port)
|
|||
webdav_port=$(ynh_app_setting_get --app $app --key webdav_port)
|
||||
final_path=$(ynh_app_setting_get --app $app --key final_path)
|
||||
seafile_user=$app
|
||||
# TODO User env variable in 4.1
|
||||
seafile_version=$(ynh_app_upstream_version)
|
||||
|
||||
ynh_script_progression --message="Stoping services..."
|
||||
|
||||
|
@ -46,8 +48,16 @@ pkill -f seaf-server || true
|
|||
pkill -f ccnet-server || true
|
||||
pkill -f seahub || true
|
||||
|
||||
if [ ]
|
||||
# Backup the current version of the app
|
||||
if [ "0$(ynh_app_setting_get --app=$app --key=disable_backup_before_upgrade)" -ne 1 ]
|
||||
then
|
||||
ynh_backup_before_upgrade
|
||||
ynh_clean_setup () {
|
||||
# Clean installation remainings that are not handled by the remove script.
|
||||
ynh_clean_check_starting
|
||||
ynh_restore_upgradebackup
|
||||
}
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# MIGRATION FROM OLD VERSION
|
||||
|
@ -176,17 +186,12 @@ case $installed_version in
|
|||
$final_path/seafile-server-$seafile_version/seahub.sh python-env seahub/manage.py migrate_file_comment
|
||||
|
||||
# Enable memcached
|
||||
cat > $final_path/conf/seahub_settings.py <<EOF
|
||||
cat >> $final_path/conf/seahub_settings.py <<EOF
|
||||
CACHES = {
|
||||
|
||||
'default': {
|
||||
|
||||
'BACKEND': 'django_pylibmc.memcached.PyLibMCCache',
|
||||
|
||||
'LOCATION': '127.0.0.1:11211',
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
EOF
|
||||
|
||||
|
|
Loading…
Reference in a new issue