From c2e8011e9f98381159b83095993c26f7caa2365e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 14 Oct 2023 14:51:39 +0200 Subject: [PATCH 1/2] cleaning --- scripts/backup | 2 -- scripts/install | 7 ++++--- scripts/remove | 2 -- scripts/restore | 1 - scripts/upgrade | 5 ----- 5 files changed, 4 insertions(+), 13 deletions(-) diff --git a/scripts/backup b/scripts/backup index 6b22d0f..8838463 100755 --- a/scripts/backup +++ b/scripts/backup @@ -31,11 +31,9 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" # BACKUP SYSTEMD #================================================= - ynh_backup --src_path="/etc/systemd/system/${app}.service" ynh_backup --src_path="/etc/systemd/system/${app}_workers.service" - #================================================= # BACKUP THE POSTGRESQL DATABASE #================================================= diff --git a/scripts/install b/scripts/install index b73c55f..34405ba 100755 --- a/scripts/install +++ b/scripts/install @@ -14,6 +14,7 @@ admin_mail=$(ynh_user_get_info --username=$admin --key=mail) #================================================= # LOGROTATE +#================================================= ynh_script_progression --message="Configuring logrotate to manage application logfiles" --weight=1 # Use logrotate to manage application logfile(s) @@ -25,7 +26,6 @@ chown -R $app:www-data /var/log/$app/ #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -#================================================= # CONFIGURE THE INSTALL SCRIPT #================================================= @@ -90,6 +90,7 @@ ynh_script_progression --message="Adding system configurations related to $app . #================================================= # NGINX CONFIGURATION +#================================================= ynh_script_progression --message="Configuring NGINX web server..." --weight=1 # Create a dedicated NGINX config @@ -97,6 +98,7 @@ ynh_add_nginx_config #================================================= # SETUP SYSTEMD +#================================================= ynh_script_progression --message="Configuring a systemd service..." --weight=1 # Create a dedicated systemd config @@ -105,16 +107,15 @@ ynh_add_systemd_config --service="${app}_workers" --template="fittrackee_workers #================================================= # INTEGRATE SERVICE IN YUNOHOST +#================================================= 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}_workers.log" - #================================================= # GENERIC FINALIZATION #================================================= -#================================================= # START SYSTEMD SERVICE #================================================= ynh_script_progression --message="Starting the systemd services..." --weight=15 diff --git a/scripts/remove b/scripts/remove index 469f9c3..75b16ff 100644 --- a/scripts/remove +++ b/scripts/remove @@ -39,7 +39,6 @@ ynh_script_progression --message="Stopping and removing the systemd service..." ynh_remove_systemd_config --service="${app}" ynh_remove_systemd_config --service="${app}_workers" - #================================================= # REMOVE VARIOUS FILES #================================================= @@ -56,7 +55,6 @@ ynh_secure_remove --file="/var/log/$app" # Remove the redis database ynh_redis_remove_db "$redis_db" - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index cdb059f..0507f48 100644 --- a/scripts/restore +++ b/scripts/restore @@ -28,7 +28,6 @@ chown -R $app:www-data /var/log/$app/ #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= - ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" diff --git a/scripts/upgrade b/scripts/upgrade index 8115a74..4321843 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -32,13 +32,11 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_systemd_action --action="stop" --service_name="${app}" ynh_systemd_action --action="stop" --service_name="${app}_workers" - #================================================= # INSTALL DEPENDENCIES #================================================= ynh_script_progression --message="Installing dependencies..." --weight=23 - chmod -R o-rwx "$install_dir" chown -R $app: "$install_dir" @@ -80,7 +78,6 @@ pushd $install_dir ynh_exec_warn_less pip install fittrackee==$fittrackee_version popd - #================================================= # Update DATABASE #================================================= @@ -88,7 +85,6 @@ ynh_script_progression --message="Upgrading database..." --weight=1 ynh_exec_warn_less $install_dir/venv/bin/ftcli db upgrade - #================================================= # NGINX CONFIGURATION #================================================= @@ -106,7 +102,6 @@ ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 ynh_add_systemd_config --service="${app}" --template="fittrackee.service" ynh_add_systemd_config --service="${app}_workers" --template="fittrackee_workers.service" - #================================================= # GENERIC FINALIZATION #================================================= From 165c93a4db6dee5c5fef76920cb8c3c1f69db8ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 17 Nov 2023 19:36:58 +0100 Subject: [PATCH 2/2] Update manifest.toml --- manifest.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 0cf4160..1d53b00 100644 --- a/manifest.toml +++ b/manifest.toml @@ -17,11 +17,14 @@ admindoc = "https://samr1.github.io/FitTrackee" code = "https://github.com/SamR1/FitTrackee" [integration] -yunohost = ">= 11.2.5" +yunohost = ">= 11.2" architectures = "all" multi_instance = true + ldap = false + sso = false + disk = "50M" ram.build = "50M" ram.runtime = "50M"