From d58a0488ed1443b85cf9a1014e85caac2931953a Mon Sep 17 00:00:00 2001 From: Endial Fang Date: Mon, 25 Sep 2023 12:31:43 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E4=B8=AD=E5=A4=84=E7=90=86=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- customer/usr/local/bin/common.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/customer/usr/local/bin/common.sh b/customer/usr/local/bin/common.sh index 9a259db..ad52b46 100644 --- a/customer/usr/local/bin/common.sh +++ b/customer/usr/local/bin/common.sh @@ -344,7 +344,7 @@ app_start_server_bg() { LOG_D "Checking ${APP_NAME} ready status..." local counter=10 - while ! app_is_server_running ; do + while app_is_server_not_running ; do LOG_D "Waiting for ${APP_NAME} to ready ... $counter" if [[ "$counter" -ne 0 ]]; then break @@ -377,7 +377,7 @@ app_stop_server() { app_is_server_running() { LOG_D "Check if ${APP_NAME} is running..." local pid - pid="$(get_pid_from_file '${LDAP_PID_FILE}')" + pid="$(get_pid_from_file ${LDAP_PID_FILE})" LOG_D "${APP_NAME} PID: ${pid}" if [[ -n "${pid}" ]]; then @@ -520,11 +520,11 @@ app_custom_init() { ;; *.ldif) LOG_D "Executing $f"; - postgresql_execute "${PG_DATABASE}" "${PG_INITSCRIPTS_USERNAME}" "${PG_INITSCRIPTS_PASSWORD}" < "$f" + ldapmodify -Y EXTERNAL -H "ldapi:///" -f ;; *.ldif.gz) LOG_D "Executing $f"; - gunzip -c "$f" | postgresql_execute "${PG_DATABASE}" "${PG_INITSCRIPTS_USERNAME}" "${PG_INITSCRIPTS_PASSWORD}" + gunzip -c "$f" | ldapmodify -Y EXTERNAL -H "ldapi:///" -f ;; *) LOG_D "Ignoring $f" ;;