1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/flarum_ynh.git synced 2024-09-03 18:36:24 +02:00

Use ynh_add_config

This commit is contained in:
tituspijean 2021-03-19 00:00:09 +01:00
parent 1e61302fbc
commit 56ec85a829
2 changed files with 5 additions and 16 deletions

View file

@ -1,4 +1,4 @@
baseUrl : "https://__DOMAIN__/__PATH__"
baseUrl : "https://__DOMAIN____PATH__"
databaseConfiguration :
host : "localhost"
database : "__USER__"
@ -8,6 +8,6 @@ adminUser :
username : "__ADMIN__"
password : "__ADMIN_PWD__"
password_confirmation : "__ADMIN_PWD__"
email : "__ADMIN_EML__"
email : "__ADMIN_MAIL__"
settings :
forum_title : "__FORUM_TITLE__"
forum_title : "__TITLE__"

View file

@ -148,19 +148,8 @@ ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --work
#=================================================
ynh_script_progression --message="Configuring Flarum..." --weight=2
# Copy the configuration.yml to working directory
finalflarumconf="$final_path/configuration.yml"
cp ../conf/configuration.yml $finalflarumconf
# Populate configuration.yml
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$finalflarumconf"
ynh_replace_string --match_string="/__PATH__" --replace_string="$path_url" --target_file="$finalflarumconf"
ynh_replace_string --match_string="__USER__" --replace_string="$app" --target_file="$finalflarumconf"
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$finalflarumconf"
ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$finalflarumconf"
ynh_replace_string --match_string="__ADMIN_PWD__" --replace_string="$admin_pwd" --target_file="$finalflarumconf"
ynh_replace_string --match_string="__ADMIN_EML__" --replace_string="$admin_mail" --target_file="$finalflarumconf"
ynh_replace_string --match_string="__FORUM_TITLE__" --replace_string="$title" --target_file="$finalflarumconf"
# Copy and populate configuration.yml to working directory
ynh_add_config --template="../conf/configuration.yml" --destination="$final_path/configuration.yml"
# Execute post-installation
pushd $final_path