From 7f7ab5da0a6280fb13e8b22c35db1d2524a6b076 Mon Sep 17 00:00:00 2001 From: nicofrand Date: Thu, 30 Apr 2020 17:30:33 +0200 Subject: [PATCH] Fix path when app is used on root (sub)domain (fix #33) --- scripts/install | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index d428307..62b7247 100644 --- a/scripts/install +++ b/scripts/install @@ -131,7 +131,7 @@ ynh_store_file_checksum --file="$bk_conf" bk_conf="${final_path}/Specific/config.system.php" cp ../conf/config.system.php "$bk_conf" -ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$bk_conf" +ynh_replace_string --match_string="__PATH__" --replace_string="${path_url%/}" --target_file="$bk_conf" ynh_replace_string --match_string="__DBNAME__" --replace_string="$db_name" --target_file="$bk_conf" ynh_replace_string --match_string="__DBUSER__" --replace_string="$db_name" --target_file="$bk_conf" ynh_replace_string --match_string="__DBPASS__" --replace_string="$db_pwd" --target_file="$bk_conf" diff --git a/scripts/upgrade b/scripts/upgrade index c598971..b9495d9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -168,7 +168,7 @@ then cp ../conf/config.system.php "$bk_conf" - ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$bk_conf" + ynh_replace_string --match_string="__PATH__" --replace_string="${path_url%/}" --target_file="$bk_conf" ynh_replace_string --match_string="__DBNAME__" --replace_string="$db_name" --target_file="$bk_conf" ynh_replace_string --match_string="__DBUSER__" --replace_string="$db_name" --target_file="$bk_conf" db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)