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)