From 32e7b4ff1bb30a87dd1cb0c7e342913c587fead6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 27 Dec 2023 10:55:21 +0100 Subject: [PATCH] fix --- scripts/install | 2 +- scripts/remove | 1 + scripts/upgrade | 13 +++++++++---- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index ff43871..c87e72b 100644 --- a/scripts/install +++ b/scripts/install @@ -66,7 +66,7 @@ popd ynh_script_progression --message="Starting a systemd service..." --weight=2 # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Server running at " +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Server running at " #================================================= # END OF SCRIPT diff --git a/scripts/remove b/scripts/remove index 8688c04..7f3b063 100644 --- a/scripts/remove +++ b/scripts/remove @@ -14,6 +14,7 @@ source /usr/share/yunohost/helpers #================================================= # REMOVE SERVICE INTEGRATION IN YUNOHOST #================================================= +ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 if ynh_exec_warn_less yunohost service status $app >/dev/null then diff --git a/scripts/upgrade b/scripts/upgrade index 259f7d7..6410135 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -27,12 +27,19 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app if $(ynh_compare_current_package_version --comparison gt --version "0.2.0~ynh1") then pushd $install_dir - redis-cli --rdb "/tmp/redis-$app.rdb" -p $redis_port + redis-cli --rdb "/tmp/redis-$app.rdb" -p $port_redis popd ynh_systemd_action --service_name=redis-$app --action="stop" --log_path="/var/log/$app/redis-$app.log" fi +#================================================= +# INSTALL NODEJS +#================================================= +ynh_script_progression --message="Installing dependencies..." --weight=5 + +ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -95,8 +102,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config -ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version - ynh_add_systemd_config # Use logrotate to manage app-specific logfile(s) @@ -112,7 +117,7 @@ yunohost service add $app --description="Software for notes" --log="/var/log/$ap #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Server running at" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Server running at" #================================================= # END OF SCRIPT