From 6a3754e3f85d1d070bef7c099e2fedba0f037b6d Mon Sep 17 00:00:00 2001 From: oiseauroch <5622590+oiseauroch@users.noreply.github.com> Date: Tue, 21 Feb 2023 11:21:16 +0000 Subject: [PATCH] Testing (#2) * add delay for node id --------- Co-authored-by: oiseauroch Co-authored-by: yunohost-bot --- README.md | 3 ++- README_fr.md | 3 ++- manifest.json | 2 +- scripts/install | 7 ++++++- scripts/restore | 1 - 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 180cfe2..df41a66 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ It shall NOT be edited by hand. # garage_ynh for YunoHost [![Integration level](https://dash.yunohost.org/integration/garage.svg)](https://dash.yunohost.org/appci/app/garage) ![Working status](https://ci-apps.yunohost.org/ci/badges/garage.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/garage.maintain.svg) + [![Install garage_ynh with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=garage) *[Lire ce readme en français.](./README_fr.md)* @@ -34,7 +35,7 @@ Garage is designed for storage clusters composed of nodes running at different p - K2V API (experimental) -**Shipped version:** 0.8.0~ynh1 +**Shipped version:** 0.8.0~ynh2 ## Disclaimers / important information * Limitations : diff --git a/README_fr.md b/README_fr.md index 654bba3..31dc3fe 100644 --- a/README_fr.md +++ b/README_fr.md @@ -6,6 +6,7 @@ It shall NOT be edited by hand. # garage_ynh pour YunoHost [![Niveau d’intégration](https://dash.yunohost.org/integration/garage.svg)](https://dash.yunohost.org/appci/app/garage) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/garage.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/garage.maintain.svg) + [![Installer garage_ynh avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=garage) *[Read this readme in english.](./README.md)* @@ -34,7 +35,7 @@ Garage is designed for storage clusters composed of nodes running at different p - K2V API (experimental) -**Version incluse :** 0.8.0~ynh1 +**Version incluse :** 0.8.0~ynh2 ## Avertissements / informations importantes * Limitations : diff --git a/manifest.json b/manifest.json index b87e0bc..e1a3acd 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "S3 storage", "fr": "stockage S3" }, - "version": "0.8.0~ynh1", + "version": "0.8.0~ynh2", "url": "https://garagehq.deuxfleurs.fr/", "upstream": { "license": "AGPL-3.0-only", diff --git a/scripts/install b/scripts/install index e512b27..a209175 100755 --- a/scripts/install +++ b/scripts/install @@ -379,7 +379,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" - #================================================= # SETUP SSOWAT #================================================= @@ -405,6 +404,12 @@ ynh_script_progression --message="Configuring garage..." --weight=1 garage_command="$final_path/garage -c $final_path/garage.toml" node_id=$($garage_command node id -q 2>/dev/null | cut -d '@' -f1) +# sometimes server need some time to start +if [ -n "$node_id" ] +then + sleep 5 + node_id=$($garage_command node id -q 2>/dev/null | cut -d '@' -f1) +fi ynh_app_setting_set --app=$app --key=node_id --value=$node_id diff --git a/scripts/restore b/scripts/restore index 2897727..c41fd10 100755 --- a/scripts/restore +++ b/scripts/restore @@ -149,7 +149,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 mkdir /var/log/$app ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" - #================================================= # RECREATE CONFIGURATION #=================================================