1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/etherpad_mypads_ynh.git synced 2024-09-03 18:36:09 +02:00

Save the password as setting to be able to later regenerate the conf file

This commit is contained in:
Alexandre Aubin 2023-12-11 01:48:52 +01:00
parent 3e5cd682e4
commit 648503a366
2 changed files with 8 additions and 0 deletions

View file

@ -7,6 +7,9 @@ fi
source _common.sh
source /usr/share/yunohost/helpers
# Save the passord (not saved automatically by the core)
ynh_app_setting_set --app=$app --key=password --value="$password"
#=================================================
# INSTALL DEPENDENCIES
#=================================================

View file

@ -55,6 +55,11 @@ if [ -z "${path:-}" ]; then
ynh_app_setting_set --app=$app --key=path --value=$path
fi
if [ -z "${password:-}" ]; then
password=$(ynh_string_random --length=32)
ynh_app_setting_set --app=$app --key=password --value="$password"
fi
# Support full Unicode in MySQL databases
ynh_mysql_connect_as --user=$db_user --password="$db_pwd" --database=$db_name \
<<< "ALTER DATABASE $db_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"