From f356f5b8f496f626aba3ec0f9d9c40c4cb54e7f6 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Sun, 10 Nov 2019 10:13:57 +0900 Subject: [PATCH] no password is needed --- check_process | 10 ---------- manifest.json | 7 ------- scripts/install | 13 +++++++------ scripts/upgrade | 1 - 4 files changed, 7 insertions(+), 24 deletions(-) diff --git a/check_process b/check_process index 0a31887..b728208 100644 --- a/check_process +++ b/check_process @@ -6,7 +6,6 @@ path="/path" (PATH) admin="john" (USER) is_public=1 (PUBLIC|public=1|private=0) - password="pass" ; Checks pkg_linter=1 setup_sub_dir=1 @@ -21,16 +20,7 @@ port_already_use=0 change_url=0 ;;; Levels - Level 1=auto - Level 2=auto - Level 3=auto - Level 4=1 Level 5=auto - Level 6=auto - Level 7=auto - Level 8=0 - Level 9=0 - Level 10=0 ;;; Options Email= Notification=none diff --git a/manifest.json b/manifest.json index 7634858..0f0e719 100644 --- a/manifest.json +++ b/manifest.json @@ -48,13 +48,6 @@ "en": "Choose a yunohost user as dotclear admin" } }, - { - "name": "password", - "type": "password", - "ask": { - "en": "Choose a dotclear password for this user" - } - }, { "name": "is_public", "type": "boolean", diff --git a/scripts/install b/scripts/install index f947727..5c78306 100755 --- a/scripts/install +++ b/scripts/install @@ -29,7 +29,6 @@ domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC admin=$YNH_APP_ARG_ADMIN -password=$YNH_APP_ARG_PASSWORD #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS @@ -52,7 +51,6 @@ ynh_app_setting_set $app domain $domain ynh_app_setting_set $app path $path_url ynh_app_setting_set $app is_public $is_public ynh_app_setting_set $app admin $admin -ynh_app_setting_set $app password $password #================================================= # CREATE A MYSQL DATABASE @@ -105,12 +103,15 @@ ynh_add_fpm_config php_config=$final_path/inc/config.php -master_key=$(dd if=/dev/urandom bs=1 count=200 2>/dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{24\}\).*/\1/p') -firstname=$(yunohost user info $admin | grep firstname: | cut -d' ' -f2 | tr -d '\n') -lastname=$(yunohost user info $admin | grep lastname: | cut -d' ' -f2 | tr -d '\n') -email=$(yunohost user info $admin | grep mail: | cut -d' ' -f2 | tr -d '\n') +master_key=$(ynh_string_random 30) ynh_app_setting_set $app master_key $master_key +firstname=$(ynh_user_get_info $admin firstname) +lastname=$(ynh_user_get_info $admin lastname) +email=$(ynh_user_get_info $admin mail) + +password=$(ynh_string_random 30) + cp $php_config.in $php_config cp ../conf/class.auth.ldap.php $final_path/inc/class.auth.ldap.php diff --git a/scripts/upgrade b/scripts/upgrade index 7220bb8..b077df9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,7 +23,6 @@ is_public=$(ynh_app_setting_get $app is_public) final_path=$(ynh_app_setting_get $app final_path) db_name=$(ynh_app_setting_get $app db_name) db_pwd=$(ynh_app_setting_get $app mysqlpwd) -password=$(ynh_app_setting_get $app password) master_key=$(ynh_app_setting_get $app master_key) #=================================================