From e23e85f3a7a576965adf0d094512238c1f004152 Mon Sep 17 00:00:00 2001 From: nathanael-h Date: Wed, 1 Dec 2021 08:54:00 +0100 Subject: [PATCH] Change: remove ynh_print_{ON,OFF} as variables end with pwd and will be redacted by yunohost --- scripts/backup | 2 -- scripts/install | 4 ---- scripts/remove | 2 -- scripts/restore | 4 ---- scripts/upgrade | 4 ++-- 5 files changed, 2 insertions(+), 14 deletions(-) diff --git a/scripts/backup b/scripts/backup index 3b87009..b19e068 100755 --- a/scripts/backup +++ b/scripts/backup @@ -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 #================================================= diff --git a/scripts/install b/scripts/install index 186fc36..c5e7ac7 100755 --- a/scripts/install +++ b/scripts/install @@ -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"";" diff --git a/scripts/remove b/scripts/remove index 8fc4ded..f5ff8c0 100755 --- a/scripts/remove +++ b/scripts/remove @@ -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 diff --git a/scripts/restore b/scripts/restore index e78c8d6..248564e 100755 --- a/scripts/restore +++ b/scripts/restore @@ -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" diff --git a/scripts/upgrade b/scripts/upgrade index e0a7e4d..2c5d6db 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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 #=================================================