diff --git a/scripts/_common.sh b/scripts/_common.sh index 1c90902..e095f0b 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -26,6 +26,13 @@ setup_dir() { } install_source() { + # Clean venv is it was on python with an old version in case major upgrade of debian + if [ ! -e $final_path/lib/python$python_version ]; then + ynh_secure_remove --file=$final_path + fi + + mkdir -p $final_path + if [ -n "$(uname -m | grep arm)" ] then # Clean old file, sometime it could make some big issues if we don't do this !! diff --git a/scripts/restore b/scripts/restore index 0f5d7ad..801dd92 100644 --- a/scripts/restore +++ b/scripts/restore @@ -40,6 +40,10 @@ ynh_system_user_create --username $pgadmin_user --home_dir /var/lib/$app ynh_script_progression --message="Restoring files..." --weight=5 ynh_restore +# Check that the good python version is installed +# If not upgrade the source +install_sources + # POPULATE THE DATABASE ynh_script_progression --message="Reconfiguring Postgresql database..." ynh_psql_test_if_first_run