From eb27a4ef6b6546eef958e65997421a10de3b34ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 29 Jan 2022 12:07:56 +0100 Subject: [PATCH] Fix url 2 (#46) * fix * Update change_url * Update upgrade * Update change_url * Add timezone --- conf/.env.example | 2 +- scripts/change_url | 6 ++++-- scripts/install | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/conf/.env.example b/conf/.env.example index 3e77129..5c09d5f 100644 --- a/conf/.env.example +++ b/conf/.env.example @@ -24,7 +24,7 @@ APP_LANG=__LANGUAGE__ APP_AUTO_LANG_PUBLIC=true # Application timezone -APP_TIMEZONE=UTC +APP_TIMEZONE=__TIMEZONE__ # Database details DB_HOST=localhost diff --git a/scripts/change_url b/scripts/change_url index c685d71..a0d5a81 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -104,11 +104,13 @@ fi #================================================= ynh_script_progression --message="Reconfiguring congif file.." --weight=1 +new_app_url_domain="https://${new_domain}${new_path%/}" + pushd $final_path - yes | php$phpversion artisan bookstack:update-url $app_url_domain https://${new_domain}${new_path%/} + yes | php$phpversion artisan bookstack:update-url $app_url_domain $new_app_url_domain popd -sed -i "/APP_URL=/c\APP_URL=https://${new_domain}${new_path}" $final_path/.env +sed -i "/APP_URL=/c\APP_URL=$new_app_url_domain" $final_path/.env #================================================= # RELOAD NGINX diff --git a/scripts/install b/scripts/install index ab146e8..fe44bca 100644 --- a/scripts/install +++ b/scripts/install @@ -25,6 +25,7 @@ path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC language=$YNH_APP_ARG_LANGUAGE phpversion=$YNH_PHP_VERSION +timezone="$(cat /etc/timezone)" redis_db=$(ynh_redis_get_free_db) mail_pwd=$(ynh_string_random --length=12)