diff --git a/conf/.env.mysql b/conf/.env.mysql index df4c6d3..3b934cc 100644 --- a/conf/.env.mysql +++ b/conf/.env.mysql @@ -13,7 +13,7 @@ APP_SECRET=__RANDOM_KEY__ # Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url # For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data/kimai.sqlite" # Configure your db driver and server_version in config/packages/doctrine.yaml -DATABASE_URL=mysql://__DB_NAME__:__DB_PWD__@127.0.0.1:3306/__DB_NAME__ +DATABASE_URL=mysql://__DB_USER__:__DB_PWD__@127.0.0.1:3306/__DB_NAME__ # DATABASE_URL=sqlite:///%kernel.project_dir%/var/data/kimai.sqlite ###< doctrine/doctrine-bundle ### diff --git a/conf/.env.sqlite b/conf/.env.sqlite index 498e30a..632d41e 100644 --- a/conf/.env.sqlite +++ b/conf/.env.sqlite @@ -13,7 +13,7 @@ APP_SECRET=__RANDOM_KEY__ # Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url # For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data/kimai.sqlite" # Configure your db driver and server_version in config/packages/doctrine.yaml -# DATABASE_URL=mysql://__DB_NAME__:__DB_PWD__@127.0.0.1:3306/__DB_NAME__ +# DATABASE_URL=mysql://__DB_USER__:__DB_PWD__@127.0.0.1:3306/__DB_NAME__ DATABASE_URL=sqlite:///%kernel.project_dir%/var/data/kimai.sqlite ###< doctrine/doctrine-bundle ### diff --git a/scripts/install b/scripts/install index fb6068e..65f4d29 100755 --- a/scripts/install +++ b/scripts/install @@ -111,14 +111,14 @@ ynh_script_progression --message="Configuring Kimai2..." local_conf="$final_path/config/packages/local.yaml" # Configure registration cp ../conf/local.yaml $local_conf -ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$local_conf" +ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$local_conf" # Registration should be allowed or not if [ $registration -eq 1 ] then - ynh_replace_string --match_string="__REGISTRATION__" --replace_string="true" --target_file="$local_conf" + ynh_replace_string --match_string="__REGISTRATION__" --replace_string="true" --target_file="$local_conf" else - ynh_replace_string --match_string="__REGISTRATION__" --replace_string="false" --target_file="$local_conf" + ynh_replace_string --match_string="__REGISTRATION__" --replace_string="false" --target_file="$local_conf" fi env_conf="$final_path/.env" @@ -126,13 +126,13 @@ env_conf="$final_path/.env" cp ../conf/.env.mysql $env_conf db_name=$(ynh_sanitize_dbid --db_name=$app) db_user=$db_name -ynh_app_setting_set --app=$app --key=db_name --value=$db_name -ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name -ynh_replace_string --match_string="__RANDOM_KEY__" --replace_string="$random_key" --target_file="$env_conf" -ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$env_conf" -ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$env_conf" -ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_name" --target_file="$env_conf" -ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$env_conf" +ynh_app_setting_set --app=$app --key=db_name --value=$db_name +ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name +ynh_replace_string --match_string="__RANDOM_KEY__" --replace_string="$random_key" --target_file="$env_conf" +ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$env_conf" +ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$env_conf" +ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_name" --target_file="$env_conf" +ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$env_conf" #ynh_add_config --template="../conf/.env.mysql" --destination="$final_path/.env"