mirror of
https://github.com/YunoHost-Apps/roundcube_ynh.git
synced 2024-09-03 20:16:28 +02:00
Add ynh_add_config
This commit is contained in:
parent
dbc4f5e1d2
commit
054dc5ec53
2 changed files with 6 additions and 17 deletions
|
@ -126,14 +126,9 @@ 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..."
|
||||||
|
|
||||||
rc_conf="$final_path/config/config.inc.php"
|
file="__FILE__"
|
||||||
|
deskey="$(ynh_string_random --length=24)"
|
||||||
cp ../conf/config.inc.php "$rc_conf"
|
ynh_add_config --template="../conf/config.inc.php" --destination="$final_path/config/config.inc.php"
|
||||||
|
|
||||||
ynh_replace_string --match_string="__DESKEY__" --replace_string="$(ynh_string_random --length=24)" --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
|
||||||
|
|
|
@ -156,15 +156,9 @@ then
|
||||||
|
|
||||||
rc_conf="$final_path/config/config.inc.php"
|
rc_conf="$final_path/config/config.inc.php"
|
||||||
|
|
||||||
# Verify the checksum and backup the file if it's different
|
file="__FILE__"
|
||||||
ynh_backup_if_checksum_is_different "$rc_conf"
|
deskey="$(ynh_string_random --length=24)"
|
||||||
|
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_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
|
||||||
|
|
Loading…
Reference in a new issue