From 85de74de0550c15b18c7e5d343c119b2efdae75c Mon Sep 17 00:00:00 2001 From: orhtej2 <2871798+orhtej2@users.noreply.github.com> Date: Fri, 29 Sep 2023 14:01:06 +0200 Subject: [PATCH] Tweak install venv usage. --- scripts/install | 3 +-- scripts/remove | 3 ++- scripts/upgrade | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index 4d3a9a4..4d7b69f 100755 --- a/scripts/install +++ b/scripts/install @@ -96,8 +96,7 @@ ynh_systemd_action --service_name=nginx --action=reload ynh_script_progression --message="Building Yunomonitor..." pushd "$final_path" - python3 -m venv venv - venv/bin/pip install --upgrade pip + python3 -m venv -- venv --system-site-packages --upgrade-deps venv/bin/pip install pycryptodome popd diff --git a/scripts/remove b/scripts/remove index cbe3ac0..329aff2 100755 --- a/scripts/remove +++ b/scripts/remove @@ -45,7 +45,8 @@ ynh_secure_remove --file="$final_path" ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 # Remove the dedicated NGINX config -ynh_remove_nginx_config +ynh_secure_remove --file="/etc/nginx/conf.d/$domain.d/000-$app.conf" +ynh_systemd_action --service_name=nginx --action=reload #================================================= # REMOVE DEPENDENCIES diff --git a/scripts/upgrade b/scripts/upgrade index a056f42..e1f835c 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -106,9 +106,10 @@ ynh_install_app_dependencies $pkg_dependencies #================================================= ynh_script_progression --message="Building Yunomonitor..." +ynh_secure_remove "$final_path/venv" + pushd "$final_path" - python3 -m venv venv - venv/bin/pip install --upgrade pip + python3 -m venv -- venv --system-site-packages --upgrade-deps venv/bin/pip install pycryptodome popd