1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/roundcube_ynh.git synced 2024-09-03 20:16:28 +02:00
This commit is contained in:
ericgaspar 2021-03-26 09:05:56 +01:00
parent 917caf35c1
commit 553ed4e02f
No known key found for this signature in database
GPG key ID: 574F281483054D44
2 changed files with 20 additions and 4 deletions

View file

@ -122,8 +122,15 @@ ynh_mysql_connect_as --user="$db_name" --password="$db_pwd" --database="$db_name
#================================================= #=================================================
ynh_script_progression --message="Configuring Roundcube..." ynh_script_progression --message="Configuring Roundcube..."
deskey=$(ynh_string_random --length=24) rc_conf="$final_path/config/config.inc.php"
ynh_add_config --template="../conf/config.inc.php" --destination="$final_path/config/config.inc.php"
cp ../conf/config.inc.php "$rc_conf"
ynh_replace_string --match_string="__DESKEY__" --replace_string="$(ynh_string_random --length=24)" --target_file="$rc_conf"
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_name" --target_file="$rc_conf"
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$rc_conf"
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$rc_conf"
ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$rc_conf"
#================================================= #=================================================
# INSTALL ADDITIONAL PLUGINS # INSTALL ADDITIONAL PLUGINS

View file

@ -144,8 +144,17 @@ then
ynh_script_progression --message="Reconfiguring Roundcube..." ynh_script_progression --message="Reconfiguring Roundcube..."
rc_conf="$final_path/config/config.inc.php" rc_conf="$final_path/config/config.inc.php"
deskey=$(ynh_string_random --length=24)
ynh_add_config --template="../conf/config.inc.php" --destination="$final_path/config/config.inc.php" # Verify the checksum and backup the file if it's different
ynh_backup_if_checksum_is_different "$rc_conf"
cp ../conf/config.inc.php "$rc_conf"
ynh_replace_string --match_string="__DESKEY__" --replace_string="$(ynh_string_random --length=24)" --target_file="$rc_conf"
ynh_replace_string --match_string="__DB_USER__" --replace_string=$db_name --target_file="$rc_conf"
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$rc_conf"
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$rc_conf"
ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$rc_conf"
#================================================= #=================================================
# UPDATE DEPENDENCIES WITH COMPOSER # UPDATE DEPENDENCIES WITH COMPOSER