From f9dfc52b4b9e287b7cb5183807781bc5d92d9180 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 28 Feb 2022 02:36:15 +0100 Subject: [PATCH] several fixes --- scripts/change_url | 22 +++++++++++----------- scripts/restore | 4 ++-- scripts/upgrade | 24 +++++++++++++----------- 3 files changed, 26 insertions(+), 24 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 8416232..c4e263f 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -79,17 +79,17 @@ fi #================================================= ynh_script_progression --message="Stopping a systemd service..." -ynh_systemd_action --service_name=${app}_authorized_keys_worker --action="stop" --log_path="systemd" --line_match="ready" -ynh_systemd_action --service_name=${app}_ci --action="stop" --log_path="systemd" --line_match="ready" -#ynh_systemd_action --service_name=${app}_ev_server --action="stop" --log_path="systemd" --line_match="ready" -ynh_systemd_action --service_name=${app}_gitolite_worker --action="stop" --log_path="systemd" --line_match="ready" -ynh_systemd_action --service_name=${app}_loadjson --action="stop" --log_path="systemd" --line_match="ready" -ynh_systemd_action --service_name=${app}_logcom --action="stop" --log_path="systemd" --line_match="ready" -#ynh_systemd_action --service_name=${app}_milters --action="stop" --log_path="systemd" --line_match="ready" -ynh_systemd_action --service_name=${app}_mirror --action="stop" --log_path="systemd" --line_match="ready" -ynh_systemd_action --service_name=${app}_webhook --action="stop" --log_path="systemd" --line_match="ready" -ynh_systemd_action --service_name=${app}_worker --action="stop" --log_path="systemd" --line_match="ready" -ynh_systemd_action --service_name="uwsgi-app@$app.service" --action="stop" --log_path="systemd" --line_match="Started" +ynh_systemd_action --service_name=${app}_authorized_keys_worker --action="stop" --log_path="systemd" +ynh_systemd_action --service_name=${app}_ci --action="stop" --log_path="systemd" +#ynh_systemd_action --service_name=${app}_ev_server --action="stop" --log_path="systemd" +ynh_systemd_action --service_name=${app}_gitolite_worker --action="stop" --log_path="systemd" +ynh_systemd_action --service_name=${app}_loadjson --action="stop" --log_path="systemd" +ynh_systemd_action --service_name=${app}_logcom --action="stop" --log_path="systemd" +#ynh_systemd_action --service_name=${app}_milters --action="stop" --log_path="systemd" +ynh_systemd_action --service_name=${app}_mirror --action="stop" --log_path="systemd" +ynh_systemd_action --service_name=${app}_webhook --action="stop" --log_path="systemd" +ynh_systemd_action --service_name=${app}_worker --action="stop" --log_path="systemd" +ynh_systemd_action --service_name="uwsgi-app@$app.service" --action="stop" --log_path="systemd" #================================================= # MODIFY URL IN NGINX CONF diff --git a/scripts/restore b/scripts/restore index 3325a31..9ba69be 100644 --- a/scripts/restore +++ b/scripts/restore @@ -101,7 +101,7 @@ systemctl enable ${app}_authorized_keys_worker.service --quiet ynh_restore_file --origin_path="/etc/systemd/system/${app}_ci.service" systemctl enable ${app}_ci.service --quiet #ynh_restore_file --origin_path="/etc/systemd/system/${app}_ev_server.service" -systemctl enable ${app}_ev_server.service --quiet +#systemctl enable ${app}_ev_server.service --quiet ynh_restore_file --origin_path="/etc/systemd/system/${app}_gitolite_worker.service" systemctl enable ${app}_gitolite_worker.service --quiet ynh_restore_file --origin_path="/etc/systemd/system/${app}_loadjson.service" @@ -109,7 +109,7 @@ systemctl enable ${app}_loadjson.service --quiet ynh_restore_file --origin_path="/etc/systemd/system/${app}_logcom.service" systemctl enable ${app}_logcom.service --quiet #ynh_restore_file --origin_path="/etc/systemd/system/${app}_milters.service" -systemctl enable ${app}_milters.service --quiet +#systemctl enable ${app}_milters.service --quiet ynh_restore_file --origin_path="/etc/systemd/system/${app}_mirror.service" systemctl enable ${app}_mirror.service --quiet ynh_restore_file --origin_path="/etc/systemd/system/${app}_webhook.service" diff --git a/scripts/upgrade b/scripts/upgrade index 50e1eee..15d3e37 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -7,6 +7,8 @@ #================================================= source _common.sh +source ynh_redis +source ynh_uwsgi_service__2 source /usr/share/yunohost/helpers #================================================= @@ -56,17 +58,17 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Stopping a systemd service..." -ynh_systemd_action --service_name=${app}_authorized_keys_worker --action="stop" --log_path="systemd" --line_match="ready" -ynh_systemd_action --service_name=${app}_ci --action="stop" --log_path="systemd" --line_match="ready" -#ynh_systemd_action --service_name=${app}_ev_server --action="stop" --log_path="systemd" --line_match="ready" -ynh_systemd_action --service_name=${app}_gitolite_worker --action="stop" --log_path="systemd" --line_match="ready" -ynh_systemd_action --service_name=${app}_loadjson --action="stop" --log_path="systemd" --line_match="ready" -ynh_systemd_action --service_name=${app}_logcom --action="stop" --log_path="systemd" --line_match="ready" -#ynh_systemd_action --service_name=${app}_milters --action="stop" --log_path="systemd" --line_match="ready" -ynh_systemd_action --service_name=${app}_mirror --action="stop" --log_path="systemd" --line_match="ready" -ynh_systemd_action --service_name=${app}_webhook --action="stop" --log_path="systemd" --line_match="ready" -ynh_systemd_action --service_name=${app}_worker --action="stop" --log_path="systemd" --line_match="ready" -ynh_systemd_action --service_name="uwsgi-app@$app.service" --action="stop" --log_path="systemd" --line_match="Started" +ynh_systemd_action --service_name=${app}_authorized_keys_worker --action="stop" --log_path="systemd" +ynh_systemd_action --service_name=${app}_ci --action="stop" --log_path="systemd" +#ynh_systemd_action --service_name=${app}_ev_server --action="stop" --log_path="systemd" +ynh_systemd_action --service_name=${app}_gitolite_worker --action="stop" --log_path="systemd" +ynh_systemd_action --service_name=${app}_loadjson --action="stop" --log_path="systemd" +ynh_systemd_action --service_name=${app}_logcom --action="stop" --log_path="systemd" +#ynh_systemd_action --service_name=${app}_milters --action="stop" --log_path="systemd" +ynh_systemd_action --service_name=${app}_mirror --action="stop" --log_path="systemd" +ynh_systemd_action --service_name=${app}_webhook --action="stop" --log_path="systemd" +ynh_systemd_action --service_name=${app}_worker --action="stop" --log_path="systemd" +ynh_systemd_action --service_name="uwsgi-app@$app.service" --action="stop" --log_path="systemd" #================================================= # ENSURE DOWNWARD COMPATIBILITY