mirror of
https://github.com/YunoHost-Apps/mautrix_facebook_ynh.git
synced 2024-09-03 19:36:33 +02:00
Change: remove ynh_print_{ON,OFF} as variables end
with pwd and will be redacted by yunohost
This commit is contained in:
parent
f91006c378
commit
e23e85f3a7
5 changed files with 2 additions and 14 deletions
|
@ -44,9 +44,7 @@ botusers=$(ynh_app_setting_get --app=$app --key=botusers)
|
|||
mautrix_config_path="$final_path/config.yaml"
|
||||
mautrix_version=$(ynh_app_setting_get --app=$app --key=mautrix_version)
|
||||
|
||||
ynh_print_OFF
|
||||
mautrix_bridge_db_pwd=$(ynh_app_setting_get --app=$app --key=mautrix_bridge_db_pwd)
|
||||
ynh_print_ON
|
||||
#=================================================
|
||||
# SET CONSTANTS
|
||||
#=================================================
|
||||
|
|
|
@ -114,16 +114,12 @@ ynh_install_app_dependencies $pkg_dependencies
|
|||
#=================================================
|
||||
ynh_script_progression --message="Creating a PostgreSQL database..." --weight=3
|
||||
|
||||
ynh_print_OFF
|
||||
mautrix_bridge_db_pwd=$(ynh_string_random --length=30)
|
||||
ynh_app_setting_set --app=$app --key=mautrix_bridge_db_pwd --value=$mautrix_bridge_db_pwd
|
||||
ynh_print_ON
|
||||
|
||||
# Create postgresql database
|
||||
ynh_psql_test_if_first_run
|
||||
ynh_print_OFF
|
||||
ynh_psql_create_user $mautrix_bridge_db_user $mautrix_bridge_db_pwd
|
||||
ynh_print_ON
|
||||
ynh_psql_execute_as_root \
|
||||
--sql="CREATE DATABASE ""$mautrix_bridge_db_name"" ENCODING 'UTF8' LC_COLLATE='C' LC_CTYPE='C' template=template0 OWNER ""$mautrix_bridge_db_user"";"
|
||||
|
||||
|
|
|
@ -32,9 +32,7 @@ botusers=$(ynh_app_setting_get --app=$app --key=botusers)
|
|||
mautrix_config_path="$final_path/config.yaml"
|
||||
mautrix_version=$(ynh_app_setting_get --app=$app --key=mautrix_version)
|
||||
|
||||
ynh_print_OFF
|
||||
mautrix_bridge_db_pwd=$(ynh_app_setting_get --app=$app --key=mautrix_bridge_db_pwd)
|
||||
ynh_print_ON
|
||||
|
||||
#=================================================
|
||||
# SET CONSTANTS
|
||||
|
|
|
@ -36,9 +36,7 @@ botname=$(ynh_app_setting_get --app=$app --key=botname)
|
|||
synapse_instance=$(ynh_app_setting_get --app=$app --key=synapse_instance)
|
||||
app_service_registration_path=$(ynh_app_setting_get --app=$app --key=app_service_registration_path)
|
||||
|
||||
ynh_print_OFF
|
||||
mautrix_bridge_db_pwd=$(ynh_app_setting_get --app=$app --key=mautrix_bridge_db_pwd)
|
||||
ynh_print_ON
|
||||
|
||||
#=================================================
|
||||
# SET CONSTANTS
|
||||
|
@ -98,9 +96,7 @@ ynh_install_app_dependencies $pkg_dependencies
|
|||
ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=8
|
||||
|
||||
ynh_psql_test_if_first_run
|
||||
ynh_print_OFF
|
||||
ynh_psql_create_user $mautrix_bridge_db_user $mautrix_bridge_db_pwd
|
||||
ynh_print_ON
|
||||
ynh_psql_execute_as_root \
|
||||
--sql="CREATE DATABASE ""$mautrix_bridge_db_name"" ENCODING 'UTF8' LC_COLLATE='C' LC_CTYPE='C' template=template0 OWNER ""$mautrix_bridge_db_user"";"
|
||||
ynh_psql_execute_file_as_root --file="${YNH_CWD}/dump.sql" --database="$mautrix_bridge_db_name"
|
||||
|
|
|
@ -32,9 +32,9 @@ botusers=$(ynh_app_setting_get --app=$app --key=botusers)
|
|||
mautrix_config_path="$final_path/config.yaml"
|
||||
mautrix_version=$(ynh_app_setting_get --app=$app --key=mautrix_version)
|
||||
|
||||
ynh_print_OFF
|
||||
mautrix_bridge_db_pwd=$(ynh_app_setting_get --app=$app --key=mautrix_bridge_db_pwd)
|
||||
ynh_print_ON#=================================================
|
||||
|
||||
#=================================================
|
||||
# SET CONSTANTS
|
||||
#=================================================
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue