mirror of
https://github.com/YunoHost-Apps/pleroma_ynh.git
synced 2024-09-03 20:15:59 +02:00
cleanup db_name and db_pwd
This commit is contained in:
parent
ca46b19f56
commit
7875dc2072
5 changed files with 11 additions and 11 deletions
|
@ -29,7 +29,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" psql_db)
|
||||
db_name=$(ynh_app_setting_get "$app" db_name)
|
||||
cache=$(ynh_app_setting_get "$app" cache)
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -141,10 +141,10 @@ ynh_install_app_dependencies git build-essential postgresql postgresql-contrib o
|
|||
### - Remove also the section "REMOVE THE POSTGRESQL DATABASE" in the remove script
|
||||
### - As well as the section "RESTORE THE POSTGRESQL DATABASE" in the restore script
|
||||
|
||||
db_name="${app}"
|
||||
db_name="$app"
|
||||
db_pwd=$(ynh_string_random 30)
|
||||
ynh_app_setting_set "$app" psql_db "$db_name"
|
||||
ynh_app_setting_set "$app" psqlpwd "$db_pwd"
|
||||
ynh_app_setting_set "$app" db_name "$db_name"
|
||||
ynh_app_setting_set "$app" db_pwd "$db_pwd"
|
||||
ynh_psql_test_if_first_run
|
||||
ynh_psql_create_user "$app" "$db_pwd"
|
||||
ynh_psql_execute_as_root \
|
||||
|
@ -230,11 +230,11 @@ cp -f ../conf/setup_db.psql "$final_path/$app/config/setup_db.psql"
|
|||
ynh_replace_string "__DOMAIN__" "$domain" "$final_path/$app/config/prod.secret.exs"
|
||||
ynh_replace_string "__KEY__" "$random_key" "$final_path/$app/config/prod.secret.exs"
|
||||
ynh_replace_string "__INSTANCE_NAME__" "$name" "$final_path/$app/config/prod.secret.exs"
|
||||
ynh_replace_string "__DB_NAME__" "$app" "$final_path/$app/config/prod.secret.exs"
|
||||
ynh_replace_string "__DB_NAME__" "$db_name" "$final_path/$app/config/prod.secret.exs"
|
||||
ynh_replace_string "__DB_PWD__" "$db_pwd" "$final_path/$app/config/prod.secret.exs"
|
||||
ynh_replace_string "__ADMIN_EMAIL__" "$admin_email" "$final_path/$app/config/prod.secret.exs"
|
||||
ynh_replace_string "__PORT__" "$port" "$final_path/$app/config/prod.secret.exs"
|
||||
ynh_replace_string "__DB_NAME__" "$app" "$final_path/$app/config/setup_db.psql"
|
||||
ynh_replace_string "__DB_NAME__" "$db_name" "$final_path/$app/config/setup_db.psql"
|
||||
ynh_replace_string "__DB_PWD__" "$db_pwd" "$final_path/$app/config/setup_db.psql"
|
||||
if [ $cache -eq 1 ]
|
||||
then
|
||||
|
|
|
@ -18,7 +18,7 @@ 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" psql_db)
|
||||
db_name=$(ynh_app_setting_get "$app" db_name)
|
||||
db_user=$db_name
|
||||
final_path=$(ynh_app_setting_get $app final_path)
|
||||
cache=$(ynh_app_setting_get "$app" cache)
|
||||
|
|
|
@ -31,8 +31,8 @@ domain=$(ynh_app_setting_get $app domain)
|
|||
path_url="/"
|
||||
final_path=$(ynh_app_setting_get $app final_path)
|
||||
port=$(ynh_app_setting_get "$app" port)
|
||||
db_name=$(ynh_app_setting_get "$app" psql_db)
|
||||
db_pwd=$(ynh_app_setting_get "$app" psqlpwd)
|
||||
db_name=$(ynh_app_setting_get "$app" db_name)
|
||||
db_pwd=$(ynh_app_setting_get "$app" db_pwd)
|
||||
cache=$(ynh_app_setting_get "$app" cache)
|
||||
|
||||
|
||||
|
|
|
@ -21,12 +21,12 @@ path_url="/"
|
|||
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)
|
||||
db_name=$(ynh_app_setting_get "$app" psql_db)
|
||||
db_name=$(ynh_app_setting_get "$app" db_name)
|
||||
admin_email=$(ynh_app_setting_get "$app" admin_email)
|
||||
random_key=$(ynh_app_setting_get "$app" random_key)
|
||||
name=$(ynh_app_setting_get "$app" name)
|
||||
port=$(ynh_app_setting_get "$app" port)
|
||||
db_pwd=$(ynh_app_setting_get "$app" psqlpwd)
|
||||
db_pwd=$(ynh_app_setting_get "$app" db_pwd)
|
||||
cache=$(ynh_app_setting_get "$app" cache)
|
||||
size=$(ynh_app_setting_get "$app" size)
|
||||
registration=$(ynh_app_setting_get "$app" registration)
|
||||
|
|
Loading…
Add table
Reference in a new issue