From 1677dcc0d2deb39d6d73063e77c6238fbc0018e8 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 1 Jul 2020 19:42:33 +0200 Subject: [PATCH] Tweaks to install ARN dev instance directly --- conf/app.src | 5 ----- manifest.json | 35 +++++++---------------------------- scripts/install | 17 ++++++----------- 3 files changed, 13 insertions(+), 44 deletions(-) delete mode 100644 conf/app.src diff --git a/conf/app.src b/conf/app.src deleted file mode 100644 index 67f599e..0000000 --- a/conf/app.src +++ /dev/null @@ -1,5 +0,0 @@ -SOURCE_URL=https://code.ffdn.org/ffdn/coin/-/archive/84e9320a037b995ecf61dbd70d1ad635f9086ce0/coin-84e9320a037b995ecf61dbd70d1ad635f9086ce0.tar.gz -SOURCE_FILENAME=coin-84e9320a037b995ecf61dbd70d1ad635f9086ce0.tar.gz -SOURCE_FORMAT=tar.gz -SOURCE_SUM=f8778b5cf407f19fcb64f178b37b19a248c5477a589eb2d7d676a793e3c4a41d -SOURCE_SUM_PRG=sha256sum diff --git a/manifest.json b/manifest.json index a83f620..4cf5e65 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name": "Coin", - "id": "coin", + "id": "arncoin", "packaging_format": 1, "description": { "en": "Member dashboard for non profit isp.", @@ -8,15 +8,13 @@ }, "license": "AGPL-3.0-or-later", "maintainer": { - "name": "ljf", - "email": "ljf+coin_ynh@grimaud.me", - "url": "https://www.arn-fai.net" + "name": "alexAubin" }, - "url": "https://code.ffdn.org/FFDN/coin/", + "url": "https://code.ffdn.org/ARN/coin/", "requirements": { "yunohost": ">= 4.0" }, - "version": "20200630~ynh1", + "version": "20200701~ynh1", "multi_instance": true, "services": [ "nginx" @@ -42,31 +40,12 @@ "example": "johndoe" }, { - "name": "email", + "name": "branch", "type": "string", "ask": { - "en": "Choose email were send notification", - "fr": "Choisissez l'email vers lequel envoyer les notifications" + "en": "Specify the upstream branch to use when setting up the repo" }, - "example": "admin@example.tld" - }, - { - "name": "isp_name", - "type": "string", - "ask": { - "en": "Enter your ISP name", - "fr": "Indiquez le nom de votre FAI" - }, - "example": "My ISP" - }, - { - "name": "isp_site", - "type": "string", - "ask": { - "en": "Enter the address of your ISP website", - "fr": "Saisissez l'adresse du siteweb de votre FAI" - }, - "example": "//www.exemple.tld" + "default": "arn-prod" } ] } diff --git a/scripts/install b/scripts/install index 480d4dc..f5d9c99 100644 --- a/scripts/install +++ b/scripts/install @@ -13,10 +13,6 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { - ### Remove this function if there's nothing to clean before calling the remove script. - read -} # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -24,17 +20,16 @@ ynh_abort_if_errors # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= +export app=$YNH_APP_INSTANCE_NAME export domain=$YNH_APP_ARG_DOMAIN export path_url=/ export admin=$YNH_APP_ARG_ADMIN -export email=$YNH_APP_ARG_EMAIL -export isp_name=$YNH_APP_ARG_ISP_NAME -export isp_site=$YNH_APP_ARG_ISP_SITE +export email=$admin@$domain +export isp_name=ARN +export isp_site="https://arn-fai.net" is_public=1 export secret=$(ynh_string_random 24) -export app=$YNH_APP_INSTANCE_NAME - #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= @@ -87,8 +82,8 @@ export db_pwd ynh_script_progression --message="Setting up source files..." ynh_app_setting_set --app=$app --key=final_path --value=$final_path -# Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir="$final_path" + +git clone https://code.ffdn.org/arn/coin --branch $branch $final_path #================================================= # NGINX CONFIGURATION