diff --git a/manifest.toml b/manifest.toml index 72b4221..3153d32 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Paperless-ngx" description.en = "Scan, index and archive all your physical documents" description.fr = "Scannez, triez et archivez tous vos documents papiers" -version = "1.14.5~ynh1" +version = "1.14.5~ynh2" maintainers = ["Tagada"] diff --git a/scripts/remove b/scripts/remove index 7c15f81..7e0bb1a 100755 --- a/scripts/remove +++ b/scripts/remove @@ -76,9 +76,6 @@ ynh_redis_remove_db "$redis_db" #================================================= ynh_script_progression --message="Removing various files..." --weight=1 -# Remove temp directory securely -ynh_secure_remove --file="/tmp/$app" - # Remove the log files ynh_secure_remove --file="/var/log/$app" diff --git a/scripts/upgrade b/scripts/upgrade index a1303ee..78ad9e1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -38,6 +38,13 @@ if [ -z "$ocr_language" ]; then ynh_app_setting_set --app=$app --key=ocr_language --value=$ocr_language fi +if ynh_compare_current_package_version -c le -v "1.14.5~ynh1" +then + # When upgrading from older version when install_dir was in /var/www, + # we need to rebuild the venv entierly + ynh_secure_remove --file="$install_dir/venv" +fi + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -66,7 +73,7 @@ ynh_add_nginx_config #================================================= # INSTALL PYTHON DEPENDENCIES #================================================= -#REMOVEME? ynh_script_progression --message="Installing Python dependencies..." +ynh_script_progression --message="Installing Python dependencies..." pushd $install_dir python3 -m venv venv