From 10d5ff35cacda2de8c7c50ab9b0536d9819eaeb3 Mon Sep 17 00:00:00 2001 From: douzeb Date: Sun, 9 Oct 2022 17:01:18 +0200 Subject: [PATCH 1/2] Make virtualization configurable at install time --- conf/garage.toml | 1 + manifest.json | 10 ++++++++++ scripts/install | 5 ++--- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/conf/garage.toml b/conf/garage.toml index beb3a68..04df5f6 100644 --- a/conf/garage.toml +++ b/conf/garage.toml @@ -1,5 +1,6 @@ metadata_dir = "/opt/yunohost/__APP__/metadata" data_dir = "__DATADIR__" +virtualization = "__VIRTUALIZATION__" block_size = 1048576 block_manager_background_tranquility = 2 diff --git a/manifest.json b/manifest.json index 4af1b22..d543011 100644 --- a/manifest.json +++ b/manifest.json @@ -69,6 +69,16 @@ "fr": "dossier de stockage des données" } } + { + "name": "virtualization", + "type": "boolean", + "default": "true", + "exemple": "false", + "ask" : { + "en" : "use virtual disk to constrain data size", + "fr": "utiliser un disque virtuel pour limiter la taille des données" + } + } ] } } diff --git a/scripts/install b/scripts/install index b88eb6b..4612abf 100755 --- a/scripts/install +++ b/scripts/install @@ -33,6 +33,7 @@ rpc_secret=$YNH_APP_ARG_RPC_SECRET bootstrap_peers=$YNH_APP_ARG_BOOTSTRAP_PEERS datadir=$YNH_APP_ARG_DATADIR weight=$YNH_APP_ARG_WEIGHT +virtualization=$YNH_APP_ARG_VIRTUALIZATION ### If it's a multi-instance app, meaning it can be installed several times independently @@ -95,10 +96,7 @@ ynh_script_progression --message="Checking virtualisation availability…" --tim if [ "$(which modprobe)" = "" ] then virtualisation=false -else - virtualisation=true fi -ynh_app_setting_set --app=$app --key=virtualisation --value=true #================================================= # STORE SETTINGS FROM MANIFEST @@ -109,6 +107,7 @@ ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=rpc_secret --value=$rpc_secret ynh_app_setting_set --app=$app --key=datadir --value=$datadir ynh_app_setting_set --app=$app --key=bootstrap_peers --value=$bootstrap_peers +ynh_app_setting_set --app=$app --key=virtualisation --value=$virtualisation #================================================= -- 2.39.5 From e685e0b9c38bb975f7dd67545e49dac11a985b85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Douze=20B=C3=A9?= <12b@distrilab.fr> Date: Sun, 9 Oct 2022 15:06:17 +0000 Subject: [PATCH 2/2] mise a jour version --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index d543011..34d621f 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "S3 storage", "fr": "stockage S3" }, - "version": "0.7.3~ynh1", + "version": "0.7.3~ynh2", "url": "https://garagehq.deuxfleurs.fr/", "upstream": { "license": "free", -- 2.39.5