From 866a977bd80c0b40825b3baf728fefd3262356d5 Mon Sep 17 00:00:00 2001 From: Yalh Date: Tue, 29 Jan 2019 01:54:44 +0100 Subject: [PATCH] updating to variables --- README.md | 2 +- check_process | 5 ----- manifest.json | 31 ------------------------------- scripts/backup | 2 +- scripts/change_url | 2 +- scripts/install | 10 +++++----- scripts/remove | 4 ++-- scripts/restore | 2 +- scripts/upgrade | 14 +++++++------- 9 files changed, 18 insertions(+), 54 deletions(-) diff --git a/README.md b/README.md index 8945b1b..b0c341f 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Quick description of this app. ## Configuration -How to configure this app: by an admin panel, a plain file with SSH, or any other way. +No configuration available for now. ## Documentation diff --git a/check_process b/check_process index a4acac1..5af64d0 100644 --- a/check_process +++ b/check_process @@ -6,12 +6,7 @@ ;; Test complet ; Manifest domain="domain.tld" (DOMAIN) - path="/path" (PATH) - admin="john" (USER) - language="fr" is_public=1 (PUBLIC|public=1|private=0) - password="pass" - port="666" (PORT) ; Checks pkg_linter=1 setup_sub_dir=1 diff --git a/manifest.json b/manifest.json index e352f99..fd24b64 100644 --- a/manifest.json +++ b/manifest.json @@ -32,15 +32,6 @@ }, "example": "distbin.example.com" }, - { - "name": "admin", - "type": "user", - "ask": { - "en": "Choose an admin user", - "fr": "Choisissez l’administrateur" - }, - "example": "johndoe" - }, { "name": "is_public", "type": "boolean", @@ -49,28 +40,6 @@ "fr": "Est-ce une application publique ?" }, "default": true - }, - { - "name": "language", - "ask": { - "en": "Choose the application language", - "fr": "Choisissez la langue de l'application" - }, - "choices": ["fr", "en"], - "default": "fr" - }, - { - "name": "password", - "type": "password", - "ask": { - "en": "Set the administrator password", - "fr": "Définissez le mot de passe administrateur" - }, - "help": { - "en": "Use the help field to add an information for the admin about this question.", - "fr": "Utilisez le champ aide pour ajouter une information à l'intention de l'administrateur à propos de cette question." - }, - "example": "Choose a password" } ] } diff --git a/scripts/backup b/scripts/backup index 2284dca..4d28732 100644 --- a/scripts/backup +++ b/scripts/backup @@ -28,7 +28,7 @@ app=$YNH_APP_INSTANCE_NAME final_path=$(ynh_app_setting_get $app final_path) domain=$(ynh_app_setting_get $app domain) -db_name=$(ynh_app_setting_get $app db_name) +#db_name=$(ynh_app_setting_get $app db_name) #================================================= # STANDARD BACKUP STEPS diff --git a/scripts/change_url b/scripts/change_url index f71fc77..4775517 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -17,7 +17,7 @@ old_domain=$YNH_APP_OLD_DOMAIN old_path=$YNH_APP_OLD_PATH new_domain=$YNH_APP_NEW_DOMAIN -new_path=$YNH_APP_NEW_PATH +new_path="/" app=$YNH_APP_INSTANCE_NAME diff --git a/scripts/install b/scripts/install index a31b7f4..85c072a 100644 --- a/scripts/install +++ b/scripts/install @@ -26,10 +26,10 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url="/" -admin=$YNH_APP_ARG_ADMIN +#admin=$YNH_APP_ARG_ADMIN is_public=$YNH_APP_ARG_IS_PUBLIC -language=$YNH_APP_ARG_LANGUAGE -password=$YNH_APP_ARG_PASSWORD +#language=$YNH_APP_ARG_LANGUAGE +#password=$YNH_APP_ARG_PASSWORD ### If it's a multi-instance app, meaning it can be installed several times independently ### The id of the app as stated in the manifest is available as $YNH_APP_ID @@ -64,9 +64,9 @@ ynh_webpath_register $app $domain $path_url ynh_app_setting_set $app domain $domain ynh_app_setting_set $app path $path_url -ynh_app_setting_set $app admin $admin +#ynh_app_setting_set $app admin $admin ynh_app_setting_set $app is_public $is_public -ynh_app_setting_set $app language $language +#ynh_app_setting_set $app language $language #================================================= # STANDARD MODIFICATIONS diff --git a/scripts/remove b/scripts/remove index 32d27bb..2f8603f 100644 --- a/scripts/remove +++ b/scripts/remove @@ -17,8 +17,8 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get $app domain) port=$(ynh_app_setting_get $app port) -db_name=$(ynh_app_setting_get $app db_name) -db_user=$db_name +#db_name=$(ynh_app_setting_get $app db_name) +#db_user=$db_name final_path=$(ynh_app_setting_get $app final_path) #================================================= diff --git a/scripts/restore b/scripts/restore index b0ff196..7ba7015 100644 --- a/scripts/restore +++ b/scripts/restore @@ -29,7 +29,7 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get $app domain) path_url=$(ynh_app_setting_get $app path) final_path=$(ynh_app_setting_get $app final_path) -db_name=$(ynh_app_setting_get $app db_name) +#db_name=$(ynh_app_setting_get $app db_name) #================================================= # CHECK IF THE APP CAN BE RESTORED diff --git a/scripts/upgrade b/scripts/upgrade index d8e6a57..7a3c5db 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -17,11 +17,11 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get $app domain) path_url=$(ynh_app_setting_get $app path) -admin=$(ynh_app_setting_get $app admin) +#admin=$(ynh_app_setting_get $app admin) is_public=$(ynh_app_setting_get $app is_public) final_path=$(ynh_app_setting_get $app final_path) -language=$(ynh_app_setting_get $app language) -db_name=$(ynh_app_setting_get $app db_name) +#language=$(ynh_app_setting_get $app language) +#db_name=$(ynh_app_setting_get $app db_name) #================================================= # ENSURE DOWNWARD COMPATIBILITY @@ -37,10 +37,10 @@ elif [ "$is_public" = "No" ]; then fi # If db_name doesn't exist, create it -if [ -z $db_name ]; then - db_name=$(ynh_sanitize_dbid $app) - ynh_app_setting_set $app db_name $db_name -fi +#if [ -z $db_name ]; then +# db_name=$(ynh_sanitize_dbid $app) +# ynh_app_setting_set $app db_name $db_name +#fi # If final_path doesn't exist, create it if [ -z $final_path ]; then