From 1d270937159a5b5b843129ef6a642468d7cd91c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 11 Jul 2023 16:13:49 +0200 Subject: [PATCH] cleaning --- scripts/install | 21 ++++----------------- scripts/upgrade | 20 ++++---------------- 2 files changed, 8 insertions(+), 33 deletions(-) diff --git a/scripts/install b/scripts/install index f0c4405..e60562f 100644 --- a/scripts/install +++ b/scripts/install @@ -16,16 +16,9 @@ ynh_script_progression --message="Installing dependencies..." --weight=10 ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version ynh_use_nodejs + $ynh_npm install -g configurable-http-proxy -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=1 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # SPECIFIC SETUP #================================================= @@ -33,8 +26,6 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Building app..." -#mkdir -p "$install_dir" - pushd $install_dir python3 -m venv $install_dir/venv source $install_dir/venv/bin/activate @@ -61,16 +52,12 @@ chown -R $admin: $install_dir/venv/ #================================================= ynh_script_progression --message="Configuring a systemd service..." --weight=3 +# Create a dedicated NGINX config +ynh_add_nginx_config + # Create a dedicated systemd config ynh_add_systemd_config -#================================================= -# GENERIC FINALIZATION -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - yunohost service add $app --description="Python console environment" --log="/var/log/$app/$app.log" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 7c531d5..0f542c1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -24,14 +24,6 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=2 ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # UPGRADE DEPENDENCIES #================================================= @@ -51,7 +43,7 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Building app..." --weight=15 - ynh_secure_remove $install_dir/.venv + #ynh_secure_remove $install_dir/.venv pushd $install_dir python3 -m venv $install_dir/venv @@ -81,16 +73,12 @@ chown -R $admin: $install_dir/venv/ #================================================= ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 +# Create a dedicated NGINX config +ynh_add_nginx_config + # Create a dedicated systemd config ynh_add_systemd_config -#================================================= -# GENERIC FINALIZATION -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - yunohost service add $app --description="Python console environment" --log="/var/log/$app/$app.log" #=================================================