diff --git a/check_process b/check_process index d63873f..6d60054 100644 --- a/check_process +++ b/check_process @@ -16,8 +16,8 @@ setup_private=1 setup_public=1 upgrade=1 - upgrade=1 from_commit=11c81c1f503691272df5002dad8278bd82f34535 upgrade=1 from_commit=80a5044d13a6782063fee2d7fb7a01832a6aa767 + upgrade=1 from_commit=806bcb0f320d8e3e28711a9ae1d2b175b95c65ce backup_restore=1 multi_instance=1 incorrect_path=0 @@ -40,9 +40,9 @@ Email=jean-baptiste@holcroft.fr Notification=all ;;; Upgrade options - ; commit=11c81c1f503691272df5002dad8278bd82f34535 - name=Upgrade from 0.15~ynh2 -manifest_arg=domain=DOMAIN&path=/&admin=USER&is_public=1 ; commit=80a5044d13a6782063fee2d7fb7a01832a6aa767 name=Upgrade from 0.16.3 +manifest_arg=domain=DOMAIN&path=/&admin=USER&is_public=1 + ; commit=806bcb0f320d8e3e28711a9ae1d2b175b95c65ce + name=Upgrade from 0.17.0~ynh2 manifest_arg=domain=DOMAIN&path=/&admin=USER&is_public=1 \ No newline at end of file diff --git a/scripts/install b/scripts/install index e998f84..3a5edcf 100644 --- a/scripts/install +++ b/scripts/install @@ -70,7 +70,7 @@ ynh_app_setting_set "$app" port "$port" #================================================= ynh_install_app_dependencies build-essential curl ffmpeg \ - libjpeg-dev libmagic-dev libpq-dev postgresql python3-dev python3-venv \ + libjpeg-dev libmagic-dev libpq-dev postgresql python3-dev virtualenv \ redis-server libldap2-dev libsasl2-dev \ `# add arm support` \ zlib1g-dev libffi-dev libssl-dev @@ -138,7 +138,7 @@ ynh_system_user_create "$app" "$final_path" # PYTHON DEPENDENCIES #================================================= -python3 -m venv "$final_path/code/virtualenv" +virtualenv -p python3 "$final_path/code/virtualenv" ( set +o nounset source "${final_path}/code/virtualenv/bin/activate" diff --git a/scripts/upgrade b/scripts/upgrade index c43b2b7..68c2ce5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -66,6 +66,14 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors +#================================================= +# STOP SERVICES +#================================================= + +systemctl stop "$app-beat.service" +systemctl stop "$app-server.service" +systemctl stop "$app-worker.service" + #================================================= # CHECK THE PATH #================================================= @@ -135,7 +143,7 @@ ynh_system_user_create "$app" #================================================= ynh_install_app_dependencies build-essential curl ffmpeg \ - libjpeg-dev libmagic-dev libpq-dev postgresql python3-dev python3-venv \ + libjpeg-dev libmagic-dev libpq-dev postgresql python3-dev virtualenv \ redis-server libldap2-dev libsasl2-dev \ `# add arm support` \ zlib1g-dev libffi-dev libssl-dev @@ -146,7 +154,8 @@ ynh_install_app_dependencies build-essential curl ffmpeg \ # PYTHON DEPENDENCIES #================================================= -python3 -m venv "$final_path/code/virtualenv" +ynh_secure_remove "$final_path/code/virtualenv" +virtualenv -p python3 "$final_path/code/virtualenv" ( set +o nounset source "${final_path}/code/virtualenv/bin/activate" @@ -272,4 +281,10 @@ systemctl reload nginx # REMOVE CODE MIGRATION FLAG #================================================= -ynh_app_setting_set "$app" code_migration 2 \ No newline at end of file +ynh_app_setting_set "$app" code_migration 2 + +#================================================= +# RESTART Funkwhale +#================================================= + +systemctl restart "$app.target" \ No newline at end of file