From aa8915975923d07fa969e86f0895465aa62b0189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 29 Sep 2023 18:46:20 +0200 Subject: [PATCH] Update install --- scripts/install | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/scripts/install b/scripts/install index 8c44ce2..706f687 100755 --- a/scripts/install +++ b/scripts/install @@ -32,12 +32,12 @@ ynh_script_progression --message="Installing MinIO if needed..." --weight=18 if ! yunohost app list | grep -q "id: minio"; then echo "MinIO is not installed. Installing... " yunohost tools update -#REMOVEME? if yunohost app list | grep -q "$YNH_APP_ARG_MINIO_DOMAIN"; 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 # FIXME hackish workaround to circumvent the linter public=public -#REMOVEME? 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" + 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 #REMOVEME? minio_domain=$(ynh_app_setting_get --app="minio" --key=domain) @@ -76,17 +76,6 @@ else dex_user_uri="https://$dex_domain$dex_path/userinfo" fi -#=================================================== -# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS -#=================================================== -#REMOVEME? ynh_script_progression --message="Validating installation parameters..." --weight=1 - -#REMOVEME? install_dir=/var/www/$app -#REMOVEME? test ! -e "$install_dir" || ynh_die --message="This path already contains a folder" - -# Register (book) web path -#REMOVEME? ynh_webpath_register --app=$app --domain=$domain --path=$path - #================================================= # STORE SETTINGS FROM MANIFEST #================================================= @@ -118,7 +107,7 @@ ynh_app_setting_set --app=$app --key=dex_user_uri --value=$dex_user_uri ynh_script_progression --message="Installing dependencies..." --weight=1 # Install nodejs -ynh_install_nodejs --nodejs_version=$NODEJS_VERSION 2>&1 +ynh_install_nodejs --nodejs_version=$NODEJS_VERSION #================================================= # CREATE A POSTGRESQL DATABASE @@ -188,7 +177,6 @@ pushd "$install_dir" ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --frozen-lockfile --network-timeout 1000000000 2>&1 ynh_script_progression --message="Building... This can be very long, be patient !" --weight=18 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_OPTIONS="--max-old-space-size=3000" yarn build 2>&1 - ynh_script_progression --message="Cleaning cache... " --weight=3 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean 2>&1 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn db:migrate popd