1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pgadmin_ynh.git synced 2024-09-03 19:56:38 +02:00

Fix issues on upgrade of major debian version

This commit is contained in:
Josué Tille 2020-07-29 22:48:16 +02:00
parent 42f2e29611
commit fedc22a80b
No known key found for this signature in database
GPG key ID: 716A6C99B04194EF
2 changed files with 11 additions and 0 deletions

View file

@ -26,6 +26,13 @@ setup_dir() {
} }
install_source() { 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)" ] if [ -n "$(uname -m | grep arm)" ]
then then
# Clean old file, sometime it could make some big issues if we don't do this !! # Clean old file, sometime it could make some big issues if we don't do this !!

View file

@ -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_script_progression --message="Restoring files..." --weight=5
ynh_restore ynh_restore
# Check that the good python version is installed
# If not upgrade the source
install_sources
# POPULATE THE DATABASE # POPULATE THE DATABASE
ynh_script_progression --message="Reconfiguring Postgresql database..." ynh_script_progression --message="Reconfiguring Postgresql database..."
ynh_psql_test_if_first_run ynh_psql_test_if_first_run