Check for DB_HOST_WRITE in Akaunting V setup

This commit is contained in:
Mohammed Al-Mahdawi 2022-08-12 12:37:57 +03:00
parent 475ca0b15f
commit 28c9244ef6
1 changed files with 9 additions and 1 deletions

View File

@ -36,9 +36,17 @@ mkdir -p storage/app/uploads
if [ "$do_setup" -o "$AKAUNTING_SETUP" == "true" ]; then
retry_for=30
retry_interval=5
if [[ -z "${DB_HOST_WRITE}" ]]; then
db_host="${DB_HOST}"
else
db_host="${DB_HOST_WRITE}"
fi
while sleep $retry_interval; do
if php artisan install \
--db-host=$DB_HOST \
--db-host=$db_host \
--db-port=$DB_PORT \
--db-name=$DB_NAME \
--db-username=$DB_USERNAME \