From 83e5195fc67b17d561c62ca7750b8003761c9c2c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 11 Feb 2021 16:01:13 +0100 Subject: [PATCH] Fix --- conf/.env.example | 10 +++++----- scripts/install | 10 ++-------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/conf/.env.example b/conf/.env.example index 46cdad2..9b8ee6c 100644 --- a/conf/.env.example +++ b/conf/.env.example @@ -11,16 +11,16 @@ #-------------------------------------------------------------------- # Instance configuration -app.baseURL="__DOMAIN__" -app.mediaBaseURL="__DOMAIN__" +app.baseURL="https://__DOMAIN__" +app.mediaBaseURL="https://__DOMAIN__" app.adminGateway="cp-admin" app.authGateway="cp-auth" # Database configuration database.default.hostname="localhost" -database.default.database="__DBNAME__" -database.default.username="__DBNAME__" -database.default.password="__DBPWD__" +database.default.database="__DB_NAME__" +database.default.username="__DB_NAME__" +database.default.password="__DB_PWD__" database.default.DBPrefix="cp_" # Cache configuration (advanced) diff --git a/scripts/install b/scripts/install index 51b6589..dfe1453 100755 --- a/scripts/install +++ b/scripts/install @@ -97,13 +97,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Configuring Castopod..." --weight=1 -cp ../conf/.env.example "$final_path/.env" - -# Change variables in Castopod configuration -ynh_replace_string --match_string="__DBNAME__" --replace_string="$db_name" --target_file="$final_path/.env" -ynh_replace_string --match_string="__DBPWD__" --replace_string="$db_pwd" --target_file="$final_path/.env" -ynh_replace_string --match_string="__DOMAIN__" --replace_string="https://$domain" --target_file="$final_path/.env" -ynh_replace_string --match_string="__DOMAINPATH__" --replace_string="https://$domain$path_url" --target_file="$final_path/.env" +ynh_add_config --template="../conf/.env.example" --destination="$final_path/.env" #================================================= # STORE THE CONFIG FILE CHECKSUM @@ -125,7 +119,7 @@ chmod -R 755 $final_path #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." --weight=10 +ynh_script_progression --message="Configuring permissions..." --weight=10 # Make app public if necessary or protect it if [ $is_public -eq 1 ]