From 5aeef0ec294296681a79462c84510aea7c2ea20c Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Wed, 8 Mar 2023 21:29:14 +0100 Subject: [PATCH] clean up --- conf/.env.production | 2 +- scripts/install | 5 +++-- scripts/restore | 5 +++-- scripts/upgrade | 6 +++--- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/conf/.env.production b/conf/.env.production index 1a651be..1765397 100644 --- a/conf/.env.production +++ b/conf/.env.production @@ -23,7 +23,7 @@ REDIS_URL=redis:// # API_RATE_LIMITS="300 per 5 minutes" # Emails -UI_URL=__DOMAIN__ +# UI_URL=__DOMAIN__ # EMAIL_URL= # SENDER_EMAIL= # WORKERS_PROCESSES= diff --git a/scripts/install b/scripts/install index e4e39ef..0a534ab 100755 --- a/scripts/install +++ b/scripts/install @@ -18,6 +18,7 @@ ynh_script_progression --message="Configuring logrotate to manage application lo # Use logrotate to manage application logfile(s) ynh_use_logrotate --specific_user=$app touch /var/log/$app/$app.log +touch /var/log/$app/$app_workers.log chown -R $app:www-data /var/log/$app/ @@ -91,7 +92,7 @@ ynh_add_systemd_config --service="${app}_workers" --template="fittrackee_workers ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 yunohost service add "${app}" --description="Fittrackee main service" --log="/var/log/$app/$app.log" -yunohost service add "${app}_workers" --description="Fittrackee task queue service" --log="var/log/$app/$app.log" +yunohost service add "${app}_workers" --description="Fittrackee task queue service" --log="var/log/$app/$app_workers.log" #================================================= @@ -107,7 +108,7 @@ ynh_script_progression --message="Starting the systemd services..." --weight=15 # Start a systemd service ynh_systemd_action --service_name="${app}" --action="start" --log_path="/var/log/$app/$app.log" --line_match="Booting worker with pid" -ynh_systemd_action --service_name="${app}_workers" --action="start" --log_path="/var/log/$app/$app.log" --line_match="Started" +ynh_systemd_action --service_name="${app}_workers" --action="start" --log_path="/var/log/$app/$app_workers.log" --line_match="Started" #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index 391ec9e..a9940cf 100644 --- a/scripts/restore +++ b/scripts/restore @@ -22,6 +22,7 @@ ynh_script_progression --message="Configuring logrotate to manage application lo # Use logrotate to manage application logfile(s) ynh_use_logrotate --specific_user=$app touch /var/log/$app/$app.log +touch /var/log/$app/$app_workers.log chown -R $app:www-data /var/log/$app/ #================================================= @@ -66,7 +67,7 @@ systemctl enable "${app}_workers.service" --quiet ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 yunohost service add "${app}" --description="Fittrackee main service" --log="/var/log/$app/$app.log" -yunohost service add "${app}_workers" --description="Fittrackee task queue service" --log="var/log/$app/$app.log" +yunohost service add "${app}_workers" --description="Fittrackee task queue service" --log="var/log/$app/$app_workers.log" #================================================= # START SYSTEMD SERVICE @@ -74,7 +75,7 @@ yunohost service add "${app}_workers" --description="Fittrackee task queue servi ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name="${app}" --action="start" --log_path="/var/log/$app/$app.log" --line_match="Booting worker with pid" -ynh_systemd_action --service_name="${app}_workers" --action="start" --log_path="/var/log/$app/$app.log" --line_match="Started" +ynh_systemd_action --service_name="${app}_workers" --action="start" --log_path="/var/log/$app/$app_workers.log" --line_match="Started" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 1cdc2b9..36b43fe 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -29,7 +29,7 @@ upgrade_type=$(ynh_check_app_version_changed) ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_systemd_action --action="stop" --service_name="${app}" --log_path="/var/log/$app/$app.log" --line_match="Stopped" -ynh_systemd_action --action="stop" --service_name="${app}_workers" --log_path="systemd" --line_match="Stopped" +ynh_systemd_action --action="stop" --service_name="${app}_workers" --log_path="/var/log/$app/$app_workers.log" --line_match="Stopped" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -90,7 +90,7 @@ ynh_add_systemd_config --service="${app}_workers" --template="fittrackee_workers ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 yunohost service add "${app}" --description="Fittrackee main service" --log="/var/log/$app/$app.log" -yunohost service add "${app}_workers" --description="Fittrackee task queue service" --log="var/log/$app/$app.log" +yunohost service add "${app}_workers" --description="Fittrackee task queue service" --log="var/log/$app/$app_workers.log" #================================================= # START SYSTEMD SERVICE @@ -99,7 +99,7 @@ ynh_script_progression --message="Starting the systemd services..." --weight=15 # Start a systemd service ynh_systemd_action --service_name="${app}" --action="start" --log_path="/var/log/$app/$app.log" --line_match="Booting worker with pid" -ynh_systemd_action --service_name="${app}_workers" --action="start" --log_path="/var/log/$app/$app.log" --line_match="Started" +ynh_systemd_action --service_name="${app}_workers" --action="start" --log_path="/var/log/$app/$app_workers.log" --line_match="Started" #================================================= # END OF SCRIPT