mirror of
https://github.com/ConnectedHumber/Air-Quality-Web
synced 2024-11-21 06:22:59 +00:00
build: Create the custom settings file if it doesn't already exist
This commit is contained in:
parent
527738fa00
commit
74d8d6ee87
1 changed files with 12 additions and 0 deletions
12
build
12
build
|
@ -86,6 +86,18 @@ function task_setup {
|
|||
composer install --no-dev;
|
||||
task_end $?;
|
||||
|
||||
if [ ! -d "./data" ]; then
|
||||
task_begin "Setting up initial data folder";
|
||||
mkdir "./data"; chmod 0700 "./data";
|
||||
|
||||
echo -e "# -------[ Custom Settings File - Last updated $(date) ]-------" >"./data/settings.toml";
|
||||
echo -e '[database]\nusername = "INSERT_DATABASE_USERNAME_HERE"\npassword = "INSERT_DATABASE_PASSWORD_HERE";' >>"./data/settings.toml";
|
||||
|
||||
echo -e "${HC}Don't forget to edit './data/settings.toml' to specify the database username and password${RS}";
|
||||
|
||||
task_end $?;
|
||||
fi
|
||||
|
||||
stage_end $?;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue