From 217df64a9619c6fbece297fc5085f9b5ff52a5b4 Mon Sep 17 00:00:00 2001 From: casjay Date: Sun, 14 Jul 2024 10:45:10 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=20Modified:=20rootfs/usr/local/etc?= =?UTF-8?q?/docker/functions/entrypoint.sh=20=F0=9F=97=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modified: rootfs/usr/local/etc/docker/functions/entrypoint.sh --- .../local/etc/docker/functions/entrypoint.sh | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/rootfs/usr/local/etc/docker/functions/entrypoint.sh b/rootfs/usr/local/etc/docker/functions/entrypoint.sh index 4c17929..3db5886 100755 --- a/rootfs/usr/local/etc/docker/functions/entrypoint.sh +++ b/rootfs/usr/local/etc/docker/functions/entrypoint.sh @@ -502,7 +502,7 @@ __start_init_scripts() { name="$(basename "$init")" (eval "$init" &) initStatus=$(($? + initStatus)) - sleep 10 + sleep 20 echo "" fi done @@ -660,20 +660,21 @@ __initialize_replace_variables() { # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - __initialize_database() { [ "$IS_DATABASE_SERVICE" = "yes" ] || return 0 + local dir="${1:-$ETC_DIR}" local db_normal_user="${DATABASE_USER_NORMAL:-$user_name}" local db_normal_pass="${DATABASE_PASS_NORMAL:-$user_pass}" local db_admin_user="${DATABASE_USER_ROOT:-$root_user_name}" local db_admin_pass="${DATABASE_PASS_ROOT:-$root_user_pass}" - [ -n "$db_normal_user" ] && __replace "REPLACE_USER_NAME" "$db_normal_user" "$1" - [ -n "$db_normal_pass" ] && __replace "REPLACE_USER_PASS" "$db_normal_pass" "$1" - [ -n "$db_normal_user" ] && __replace "REPLACE_DATABASE_USER" "$db_normal_user" "$1" - [ -n "$db_normal_pass" ] && __replace "REPLACE_DATABASE_PASS" "$db_normal_pass" "$1" - [ -n "$db_admin_user" ] && __replace "REPLACE_ROOT_ADMIN" "$db_admin_user" "$1" - [ -n "$db_admin_pass" ] && __replace "REPLACE_ROOT_PASS" "$db_admin_pass" "$1" - [ -n "$db_admin_user" ] && __replace "REPLACE_DATABASE_ROOT_USER" "$db_admin_user" "$1" - [ -n "$db_admin_pass" ] && __replace "REPLACE_DATABASE_ROOT_PASS" "$db_admin_pass" "$1" - [ -n "$DATABASE_NAME" ] && __replace "REPLACE_DATABASE_NAME" "$DATABASE_NAME" "$1" - [ -n "$DATABASE_DIR" ] && __replace "REPLACE_DATABASE_DIR" "$DATABASE_DIR" "$1" + __find_replace "REPLACE_USER_NAME" "$db_normal_user" "$dir" + __find_replace "REPLACE_USER_PASS" "$db_normal_pass" "$dir" + __find_replace "REPLACE_DATABASE_USER" "$db_normal_user" "$dir" + __find_replace "REPLACE_DATABASE_PASS" "$db_normal_pass" "$dir" + __find_replace "REPLACE_ROOT_ADMIN" "$db_admin_user" "$dir" + __find_replace "REPLACE_ROOT_PASS" "$db_admin_pass" "$dir" + __find_replace "REPLACE_DATABASE_ROOT_USER" "$db_admin_user" "$dir" + __find_replace "REPLACE_DATABASE_ROOT_PASS" "$db_admin_pass" "$dir" + __find_replace "REPLACE_DATABASE_NAME" "$DATABASE_NAME" "$dir" + __find_replace "REPLACE_DATABASE_DIR" "$DATABASE_DIR" "$dir" } # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - __initialize_db_users() {