From 3beeac20e13736635fd684f72ed1fce86cd66db4 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 10 Dec 2021 17:55:35 +0100 Subject: [PATCH] Fix --- scripts/restore | 6 +++--- scripts/upgrade | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/restore b/scripts/restore index f20e0be7..b4c31085 100644 --- a/scripts/restore +++ b/scripts/restore @@ -122,10 +122,10 @@ ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name #================================================= # RESTORE SUPERVISOR CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the supervisor configuration..." +ynh_script_progression --message="Restoring the systemd configuration..." -ynh_restore_file --origin_path="/etc/supervisor/conf.d/${app}-horizon.conf" -supervisorctl reread && supervisorctl update +ynh_restore_file --origin_path="/etc/systemd/system/$app.service" +systemctl enable $app.service --quiet #================================================= # INTEGRATE SERVICE IN YUNOHOST diff --git a/scripts/upgrade b/scripts/upgrade index bc35b3e6..d431c42d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -254,7 +254,7 @@ ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" ynh_script_progression --message="Upgrading supervisor configuration..." # Create a dedicated supervisor config -ynh_add_supervisor_config --service="${app}-horizon" --template=horizon.conf +ynh_add_systemd_config #================================================= # GENERIC FINALIZATION @@ -278,7 +278,7 @@ yunohost service add "supervisor" --description="Supervisor daemon for $app" --l #================================================= ynh_script_progression --message="Starting a supervisor service..." -ynh_supervisor_action --service_name="${app}-horizon" --action="start" --log_path="systemd" --line_match="success: ${app}-horizon" +ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd" #================================================= # RELOAD NGINX