1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/matomo_ynh.git synced 2024-09-03 19:45:56 +02:00

Added config.ini.php file for configuration

This commit is contained in:
anmol 2018-10-30 15:26:24 +05:30
parent b426417e7c
commit be65aca6df
2 changed files with 16 additions and 0 deletions

8
conf/config.ini.php Normal file
View file

@ -0,0 +1,8 @@
; <?php exit; ?> DO NOT REMOVE THIS LINE
; file automatically generated or modified by Matomo; you can manually override the default values in global.ini.php by redefining them in this file.
[database]
host = "127.0.0.1"
username = "__DB__"
password = "__DB_PASSWORD__"
dbname = "__DB__"
tables_prefix = "matomo_"

View file

@ -144,7 +144,15 @@ ynh_system_user_create $app
# Create a dedicated php-fpm config
ynh_add_fpm_config
#=================================================
# MODIFY A CONFIG FILE
#=================================================
### `ynh_replace_string` is used to replace a string in a file.
### (It's compatible with sed regular expressions syntax)
cp -f ../conf/config.ini.php "$final_path/config/config.ini.php"
ynh_replace_string "__DB__" "$db_name" "$final_path/config/config.ini.php"
ynh_replace_string "__DB_PASSWORD__" "$db_pwd" "$final_path/config/config.ini.php"
#=================================================