From 143a849fbbbd60c97e32cafb6347c2b7f0f57ce0 Mon Sep 17 00:00:00 2001 From: Limezy Date: Wed, 30 Mar 2022 15:19:12 +0700 Subject: [PATCH] =?UTF-8?q?Trying=20full=20install=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.json | 13 ++++++++++++- scripts/backup | 2 ++ scripts/change_url | 2 ++ scripts/install | 10 ++++++---- scripts/remove | 2 ++ scripts/restore | 2 ++ scripts/upgrade | 2 ++ 7 files changed, 28 insertions(+), 5 deletions(-) diff --git a/manifest.json b/manifest.json index deaeb89..35a83c2 100644 --- a/manifest.json +++ b/manifest.json @@ -66,7 +66,18 @@ "name": "minio_domain", "type": "domain", "example": "docs.domain.tld", - "ask": "Domain for Minio app, used for images and attachements storage. If not yet installed, it will automatically be. Minio has to be installed at the root" + "ask": "Domain for MinIO app, used for images and attachements storage. If not yet installed, it will automatically be. Minio has to be installed at the root" + }, + { + "name": "minio_admin", + "type": "user", + "ask": "Admin for MinIO app, used for images and attachements storage. Please note that if MinIO is already installed, that setting won't be used" + }, + { + "name": "minio_password", + "type": "password", + "example": "docs.domain.tld", + "ask": "Domain for MinIO app, used for images and attachements storage. Please note that if MinIO is already installed, that setting won't be used" } ] } diff --git a/scripts/backup b/scripts/backup index ffe6481..742da2f 100755 --- a/scripts/backup +++ b/scripts/backup @@ -37,6 +37,8 @@ language_key=$(ynh_app_setting_get --app=$app --key=language_key) secret_key=$(ynh_app_setting_get --app=$app --key=secret_key) utils_secret=$(ynh_app_setting_get --app=$app --key=utils_secret) minio_domain=$(ynh_app_setting_get --app="minio" --key=domain) +minio_admin=$(ynh_app_setting_get --app="minio" --key=admin) +minio_password=$(ynh_app_setting_get --app="minio" --key=password) minio_key=$(ynh_app_setting_get --app="minio" --key=minio_key) mc_path=$(ynh_app_setting_get --app="minio" --key=mc_path) dex_domain=$(ynh_app_setting_get --app="minio" --key=dex_domain) diff --git a/scripts/change_url b/scripts/change_url index 40cc62b..fe9c16a 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -36,6 +36,8 @@ language_key=$(ynh_app_setting_get --app=$app --key=language_key) secret_key=$(ynh_app_setting_get --app=$app --key=secret_key) utils_secret=$(ynh_app_setting_get --app=$app --key=utils_secret) minio_domain=$(ynh_app_setting_get --app="minio" --key=domain) +minio_admin=$(ynh_app_setting_get --app="minio" --key=admin) +minio_password=$(ynh_app_setting_get --app="minio" --key=password) minio_key=$(ynh_app_setting_get --app="minio" --key=minio_key) mc_path=$(ynh_app_setting_get --app="minio" --key=mc_path) dex_domain=$(ynh_app_setting_get --app="minio" --key=dex_domain) diff --git a/scripts/install b/scripts/install index 7eb0daa..b1a762d 100755 --- a/scripts/install +++ b/scripts/install @@ -54,15 +54,17 @@ if ! yunohost app list | grep -q "id: minio"; then if yunohost app list | grep -q "$YNH_APP_ARG_MINIO_DOMAIN"; then ynh_die "The domain provided for MinIO is already used by another app. Please chose another one !" fi - yunohost app install https://github.com/YunoHost-Apps/minio_ynh --force --args "domain=$YNH_APP_ARG_MINIO_DOMAIN&is_public=true&language=en" + yunohost app install https://github.com/YunoHost-Apps/minio_ynh --force --args "domain=$YNH_APP_ARG_MINIO_DOMAIN&is_public=true&admin=$YNH_APP_ARG_MINIO_ADMIN&password=$YNH_APP_ARG_MINIO_PASSWORD" fi minio_domain=$(ynh_app_setting_get --app="minio" --key=domain) +minio_admin=$(ynh_app_setting_get --app="minio" --key=admin) +minio_password=$(ynh_app_setting_get --app="minio" --key=password) minio_key=$(ynh_app_setting_get --app="minio" --key=minio_key) mc_path=$(ynh_app_setting_get --app="minio" --key=mc_path) #================================================= -# CHECK IF MINIO IS INSTALLED, IF NOT INSTALL IT +# INSTALL DEX APP FOR OAUTH2 / OIDC #================================================= ynh_script_progression --message="Installing Dex..." --weight=18 @@ -78,9 +80,9 @@ fi yunohost app install https://github.com/Limezy/dex_ynh/tree/trick-nginx --force --args "domain=$dex_domain&path=$dex_path&OIDC_name=$oidc_name&OIDC_secret=$oidc_secret&OIDC_callback=$oidc_callback" -#================================================= +#=================================================== # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS -#================================================= +#=================================================== ynh_script_progression --message="Validating installation parameters..." --weight=1 final_path=/opt/yunohost/$app diff --git a/scripts/remove b/scripts/remove index 7a3b163..36d4562 100755 --- a/scripts/remove +++ b/scripts/remove @@ -24,6 +24,8 @@ language_key=$(ynh_app_setting_get --app=$app --key=language_key) secret_key=$(ynh_app_setting_get --app=$app --key=secret_key) utils_secret=$(ynh_app_setting_get --app=$app --key=utils_secret) minio_domain=$(ynh_app_setting_get --app="minio" --key=domain) +minio_admin=$(ynh_app_setting_get --app="minio" --key=admin) +minio_password=$(ynh_app_setting_get --app="minio" --key=password) minio_key=$(ynh_app_setting_get --app="minio" --key=minio_key) mc_path=$(ynh_app_setting_get --app="minio" --key=mc_path) dex_domain=$(ynh_app_setting_get --app="minio" --key=dex_domain) diff --git a/scripts/restore b/scripts/restore index 53c19ba..5b4f4c1 100755 --- a/scripts/restore +++ b/scripts/restore @@ -46,6 +46,8 @@ language_key=$(ynh_app_setting_get --app=$app --key=language_key) secret_key=$(ynh_app_setting_get --app=$app --key=secret_key) utils_secret=$(ynh_app_setting_get --app=$app --key=utils_secret) minio_domain=$(ynh_app_setting_get --app="minio" --key=domain) +minio_admin=$(ynh_app_setting_get --app="minio" --key=admin) +minio_password=$(ynh_app_setting_get --app="minio" --key=password) minio_key=$(ynh_app_setting_get --app="minio" --key=minio_key) mc_path=$(ynh_app_setting_get --app="minio" --key=mc_path) dex_domain=$(ynh_app_setting_get --app="minio" --key=dex_domain) diff --git a/scripts/upgrade b/scripts/upgrade index c52f12d..b943d2e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,6 +25,8 @@ language_key=$(ynh_app_setting_get --app=$app --key=language_key) secret_key=$(ynh_app_setting_get --app=$app --key=secret_key) utils_secret=$(ynh_app_setting_get --app=$app --key=utils_secret) minio_domain=$(ynh_app_setting_get --app="minio" --key=domain) +minio_admin=$(ynh_app_setting_get --app="minio" --key=admin) +minio_password=$(ynh_app_setting_get --app="minio" --key=password) minio_key=$(ynh_app_setting_get --app="minio" --key=minio_key) mc_path=$(ynh_app_setting_get --app="minio" --key=mc_path) dex_domain=$(ynh_app_setting_get --app="minio" --key=dex_domain)