From 292ce95abf4f3a405e6b73633566f835c473b27e Mon Sep 17 00:00:00 2001 From: "Xinwei Xiong(cubxxw-openim)" <3293172751nss@gmail.com> Date: Thu, 17 Aug 2023 18:03:56 +0800 Subject: [PATCH] fix: fix config path file Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --- .gitignore | 2 +- config/openim_config.yaml | 4 ++-- go.sum | 4 ++-- scripts/advertise.sh | 2 +- scripts/docker_check_service.sh | 7 +------ scripts/install/environment.sh | 6 +++--- scripts/lib/util.sh | 7 +++---- 7 files changed, 13 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index bb9e8e8c0..12322d9d6 100644 --- a/.gitignore +++ b/.gitignore @@ -153,7 +153,7 @@ flycheck_*.el *.out # Dependency directories (remove the comment below to include it) -# vendor/ +vendor/ # Go workspace file # go.work diff --git a/config/openim_config.yaml b/config/openim_config.yaml index 581d811ed..81775361e 100644 --- a/config/openim_config.yaml +++ b/config/openim_config.yaml @@ -135,11 +135,11 @@ object: apiURL: "http://127.0.0.1:10002/object/" minio: bucket: "openim" - endpoint: "http://http://127.0.0.1:10005" + endpoint: "http://127.0.0.1:10005" accessKeyID: "root" secretAccessKey: "openIM123" sessionToken: '' - signEndpoint: "http://http://127.0.0.1:10005" + signEndpoint: "http://127.0.0.1:10005" cos: bucketURL: https://temp-1252357374.cos.ap-chengdu.myqcloud.com secretID: '' diff --git a/go.sum b/go.sum index 6255d1a04..bf86b45e1 100644 --- a/go.sum +++ b/go.sum @@ -8,8 +8,8 @@ cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGB cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/firestore v1.11.0 h1:PPgtwcYUOXV2jFe1bV3nda3RCrOa8cvBjTOn2MQVfW8= cloud.google.com/go/firestore v1.11.0/go.mod h1:b38dKhgzlmNNGTNZZwe7ZRFEuRab1Hay3/DBsIGKKy4= -cloud.google.com/go/iam v1.1.0 h1:67gSqaPukx7O8WLLHMa0PNs3EBGd2eE4d+psbO/CO94= -cloud.google.com/go/iam v1.1.0/go.mod h1:nxdHjaKfCr7fNYx/HJMM8LgiMugmveWlkatear5gVyk= +cloud.google.com/go/iam v1.1.1 h1:lW7fzj15aVIXYHREOqjRBV9PsH0Z6u8Y46a1YGvQP4Y= +cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= cloud.google.com/go/longrunning v0.5.1 h1:Fr7TXftcqTudoyRJa113hyaqlGdiBQkp0Gq7tErFDWI= cloud.google.com/go/longrunning v0.5.1/go.mod h1:spvimkwdz6SPWKEt/XBij79E9fiTkHSQl/fRUUQJYJc= cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= diff --git a/scripts/advertise.sh b/scripts/advertise.sh index 2c9754fba..165fa397d 100755 --- a/scripts/advertise.sh +++ b/scripts/advertise.sh @@ -18,7 +18,7 @@ set -o pipefail . $(dirname ${BASH_SOURCE})/lib/init.sh -openim::util::onCtrlC +trap 'openim::util::onCtrlC' INT print_with_delay() { text="$1" diff --git a/scripts/docker_check_service.sh b/scripts/docker_check_service.sh index b1678777c..33c386329 100755 --- a/scripts/docker_check_service.sh +++ b/scripts/docker_check_service.sh @@ -22,12 +22,7 @@ source "$SCRIPTS_ROOT/style_info.sh" echo -e "${GREEN_PREFIX}=========> Check docker-compose status ${COLOR_SUFFIX} \n" -function openim::util::onCtrlC() { - kill -9 "${do_sth_pid}" "${progress_pid}" "${countdown_pid}" - echo - echo 'Ctrl+C is captured' - exit 1 -} + cd "$OPENIM_ROOT" diff --git a/scripts/install/environment.sh b/scripts/install/environment.sh index afcce8aa1..4daae2931 100755 --- a/scripts/install/environment.sh +++ b/scripts/install/environment.sh @@ -36,7 +36,7 @@ function def() { } # app要能访问到此ip和端口或域名 -def "API_URL" "http://${IP}:10002/object/" +def "API_URL" "${IP}:10002/object/" def "DATA_DIR" "${OPENIM_ROOT}" # 设置统一的用户名,方便记忆 @@ -105,11 +105,11 @@ def "OBJECT_APIURL" "http://127.0.0.1:10002/object/" # 对 def "MINIO_BUCKET" "openim" # MinIO的存储桶名称 def "MINIO_PORT" "10005" # MinIO的端口 # MinIO的端点URL -readonly MINIO_ENDPOINT=${MINIO_ENDPOINT:-"http://${IP}:${MINIO_PORT}"} +readonly MINIO_ENDPOINT=${MINIO_ENDPOINT:-"${IP}:${MINIO_PORT}"} def "MINIO_ACCESS_KEY" "${USER}" # MinIO的访问密钥ID def "MINIO_SECRET_KEY" "${PASSWORD}" # MinIO的密钥 def "MINIO_SESSION_TOKEN" # MinIO的会话令牌 -readonly MINIO_SIGN_ENDPOINT=${MINIO_SIGN_ENDPOINT:-"http://${IP}:${MINIO_PORT}"} # signEndpoint为minio公网地址 # MinIO的会话令牌 +readonly MINIO_SIGN_ENDPOINT=${MINIO_SIGN_ENDPOINT:-"${IP}:${MINIO_PORT}"} # signEndpoint为minio公网地址 # MinIO的会话令牌 def "COS_BUCKET_URL" "https://temp-1252357374.cos.ap-chengdu.myqcloud.com" # 腾讯云COS的存储桶URL def "COS_SECRET_ID" # 腾讯云COS的密钥ID def "COS_SECRET_KEY" # 腾讯云COS的密钥 diff --git a/scripts/lib/util.sh b/scripts/lib/util.sh index 12417e991..261aed13a 100755 --- a/scripts/lib/util.sh +++ b/scripts/lib/util.sh @@ -1212,11 +1212,10 @@ function openim::util::get_server_ip() { echo "$IP" } -function openim::util::onCtrlC () { - #Capture CTRL+C, terminate the background process of the program when the script is terminated in the form of ctrl+c - kill -9 ${do_sth_pid} ${progress_pid} +function openim::util::onCtrlC() { + kill -9 "${do_sth_pid}" "${progress_pid}" "${countdown_pid}" echo - echo '!!! openim: Ctrl+C is captured' + echo 'Ctrl+C is captured' exit 1 }