From a8f876cf959a8487f1085cf955b92edce72b140e Mon Sep 17 00:00:00 2001 From: orhtej2 <2871798+orhtej2@users.noreply.github.com> Date: Sun, 18 Feb 2024 18:56:00 +0100 Subject: [PATCH] Fix restore and change_url --- scripts/change_url | 7 +++++-- scripts/restore | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 1998d1e..56c9b45 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -14,7 +14,8 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Stopping a systemd service..." -ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app-backend --action="stop" +ynh_systemd_action --service_name=$app-exporter --action="stop" #================================================= # MODIFY URL IN NGINX CONF @@ -34,7 +35,9 @@ ynh_change_url_nginx_config #================================================= ynh_script_progression --message="Starting a systemd service..." -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app-backend --action="start" --log_path="/var/log/$app/$app-backend.log" --line_match="welcome to penpot" + +ynh_systemd_action --service_name=$app-exporter --action="start" --log_path="/var/log/$app/$app-exporter.log" --line_match="redis connection established" #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index e68669e..334c1ec 100644 --- a/scripts/restore +++ b/scripts/restore @@ -13,6 +13,10 @@ source /usr/share/yunohost/helpers #================================================= # RESTORE THE APP MAIN DIR #================================================= + +ynh_script_progression --message="Restoring NodeJS..." --weight=2 +ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version + ynh_script_progression --message="Restoring the app main directory..." --weight=1 ynh_restore_file --origin_path="$install_dir"