mirror of
https://github.com/YunoHost-Apps/kresus_ynh.git
synced 2024-09-03 19:36:10 +02:00
Merge pull request #1 from YunoHost-Apps/pr
don't generate psql password
This commit is contained in:
commit
f9133f423a
3 changed files with 9 additions and 15 deletions
|
@ -60,17 +60,11 @@ ynh_app_setting_set "$app" path "$path_url"
|
|||
# DEFAULT SETTINGS
|
||||
#=================================================
|
||||
|
||||
db_name="$app"
|
||||
db_user="$app"
|
||||
port=$(ynh_find_port 9876)
|
||||
salt=$(ynh_string_random 40)
|
||||
db_pwd=$(ynh_string_random 40)
|
||||
|
||||
ynh_app_setting_set "$app" port "$port"
|
||||
ynh_app_setting_set "$app" salt "$salt"
|
||||
ynh_print_OFF
|
||||
ynh_app_setting_set "$app" db_pwd "$db_pwd"
|
||||
ynh_print_ON
|
||||
|
||||
#=================================================
|
||||
# STANDARD MODIFICATIONS
|
||||
|
@ -148,8 +142,12 @@ ynh_use_nodejs
|
|||
# Setup Kresus postgresql database
|
||||
#=================================================
|
||||
|
||||
db_name="$app"
|
||||
db_user="$app"
|
||||
|
||||
ynh_psql_test_if_first_run
|
||||
ynh_psql_setup_db "$db_user" "$db_name" "$db_pwd"
|
||||
ynh_psql_setup_db "$db_user" "$db_name"
|
||||
db_pwd=$(ynh_app_setting_get "$app" psqlpwd)
|
||||
|
||||
#=================================================
|
||||
# CONFIGURE KRESUS
|
||||
|
|
|
@ -30,7 +30,7 @@ domain=$(ynh_app_setting_get "$app" domain)
|
|||
path_url=$(ynh_app_setting_get "$app" path)
|
||||
final_path=$(ynh_app_setting_get "$app" final_path)
|
||||
salt=$(ynh_app_setting_get "$app" salt)
|
||||
db_pwd=$(ynh_app_setting_get "$app" db_pwd)
|
||||
db_pwd=$(ynh_app_setting_get "$app" psqlpwd)
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE RESTORED
|
||||
|
|
|
@ -26,7 +26,7 @@ path_url=$(ynh_app_setting_get "$app" path)
|
|||
final_path=$(ynh_app_setting_get "$app" final_path)
|
||||
port=$(ynh_app_setting_get "$app" port)
|
||||
salt=$(ynh_app_setting_get "$app" salt)
|
||||
db_pwd=$(ynh_app_setting_get "$app" db_pwd)
|
||||
db_pwd=$(ynh_app_setting_get "$app" psqlpwd)
|
||||
|
||||
#=================================================
|
||||
# ENSURE DOWNWARD COMPATIBILITY
|
||||
|
@ -49,13 +49,9 @@ if [ -z "$salt" ]; then
|
|||
fi
|
||||
|
||||
if [ -z "$db_pwd" ]; then
|
||||
ynh_print_OFF
|
||||
db_pwd=$(ynh_string_random 40)
|
||||
ynh_app_setting_set "$app" db_pwd "$db_pwd"
|
||||
ynh_print_ON
|
||||
|
||||
ynh_psql_test_if_first_run
|
||||
ynh_psql_setup_db "$db_user" "$db_name" "$db_pwd"
|
||||
ynh_psql_setup_db "$db_user" "$db_name"
|
||||
db_pwd=$(ynh_app_setting_get "$app" psqlpwd)
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue