From 19b4db2c00e607620bf59bd8c3443bcc76aafb73 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 27 Mar 2021 11:53:41 +0100 Subject: [PATCH] Fix --- scripts/install | 20 +++++++++----------- scripts/upgrade | 25 +++++++++++-------------- 2 files changed, 20 insertions(+), 25 deletions(-) diff --git a/scripts/install b/scripts/install index dfd5545..9f3090b 100644 --- a/scripts/install +++ b/scripts/install @@ -132,17 +132,15 @@ conf_path="${final_path}/web/config/settings.php" logdir=/var/log/$app -# ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$conf_path" -# ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$conf_path" -# ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$conf_path" -# ynh_replace_string --match_string="__ENCRYPTKEY__" --replace_string="$encryptkey" --target_file="$conf_path" -# ynh_replace_string --match_string="__LOGDIR__" --replace_string="$logdir" --target_file="$conf_path" -# ynh_replace_string --match_string="__TIMEZONE__" --replace_string="$timezone" --target_file="$conf_path" -# ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$conf_path" -# ynh_replace_string --match_string="__CALDAV_BASE_URL__" --replace_string="${caldav_url}${caldav_baseurl}" --target_file="$conf_path" -# ynh_replace_string --match_string="__CALDAV_DOMAIN__" --replace_string="$caldav_domain" --target_file="$conf_path" - -ynh_add_config --template="../conf/settings.php" --destination="$conf_path" +ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$conf_path" +ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$conf_path" +ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$conf_path" +ynh_replace_string --match_string="__ENCRYPTKEY__" --replace_string="$encryptkey" --target_file="$conf_path" +ynh_replace_string --match_string="__LOGDIR__" --replace_string="$logdir" --target_file="$conf_path" +ynh_replace_string --match_string="__TIMEZONE__" --replace_string="$timezone" --target_file="$conf_path" +ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$conf_path" +ynh_replace_string --match_string="__CALDAV_BASE_URL__" --replace_string="${caldav_url}${caldav_baseurl}" --target_file="$conf_path" +ynh_replace_string --match_string="__CALDAV_DOMAIN__" --replace_string="$caldav_domain" --target_file="$conf_path" #================================================= # STORE THE CHECKSUM OF THE CONFIG FILE diff --git a/scripts/upgrade b/scripts/upgrade index 29fdb20..3a85e65 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -152,22 +152,19 @@ conf_path="${final_path}/web/config/settings.php" logdir=/var/log/$app -# ynh_backup_if_checksum_is_different --file="$conf_path" +ynh_backup_if_checksum_is_different --file="$conf_path" -# cp ../conf/settings.php "$conf_path" +cp ../conf/settings.php "$conf_path" -# ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$conf_path" -# ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$conf_path" -# ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$conf_path" -# ynh_replace_string --match_string="__ENCRYPTKEY__" --replace_string="$encryptkey" --target_file="$conf_path" -# ynh_replace_string --match_string="__LOGDIR__" --replace_string="$logdir" --target_file="$conf_path" -# ynh_replace_string --match_string="__TIMEZONE__" --replace_string="$timezone" --target_file="$conf_path" -# ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$conf_path" -# ynh_replace_string --match_string="__CALDAV_BASE_URL__" --replace_string="${caldav_url}${caldav_baseurl}" --target_file="$conf_path" -# ynh_replace_string --match_string="__CALDAV_DOMAIN__" --replace_string="$caldav_domain" --target_file="$conf_path" - - -ynh_add_config --template="../conf/settings.php" --destination="$conf_path" +ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$conf_path" +ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$conf_path" +ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$conf_path" +ynh_replace_string --match_string="__ENCRYPTKEY__" --replace_string="$encryptkey" --target_file="$conf_path" +ynh_replace_string --match_string="__LOGDIR__" --replace_string="$logdir" --target_file="$conf_path" +ynh_replace_string --match_string="__TIMEZONE__" --replace_string="$timezone" --target_file="$conf_path" +ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$conf_path" +ynh_replace_string --match_string="__CALDAV_BASE_URL__" --replace_string="${caldav_url}${caldav_baseurl}" --target_file="$conf_path" +ynh_replace_string --match_string="__CALDAV_DOMAIN__" --replace_string="$caldav_domain" --target_file="$conf_path" #================================================= # STORE THE CHECKSUM OF THE CONFIG FILE