mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-04 00:55:59 +08:00
fix: Fixed some unused scripts and some names
Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>
This commit is contained in:
+3
-3
@@ -51,7 +51,7 @@ scripts/
|
||||
├── golangci.yml # Configuration for GolangCI linting.
|
||||
├── init-config.sh # Initialize configurations.
|
||||
├── init-env.sh # Initialize the environment.
|
||||
├── init_pwd.sh # Initialize or set password.
|
||||
├── init-pwd.sh # Initialize or set password.
|
||||
├── install # Installation scripts directory.
|
||||
│ ├── README.md # Installation documentation.
|
||||
│ ├── common.sh # Common utilities for installation.
|
||||
@@ -123,7 +123,7 @@ Each directory and script in the structure should be understood as a part of a l
|
||||
|
||||
**PATH:** `scripts/lib/logging.sh`
|
||||
|
||||
+ [log details](../docs/conversions/bash_log.md)
|
||||
+ [log details](../docs/contrib/bash_log.md)
|
||||
|
||||
## Supported platforms
|
||||
|
||||
@@ -154,7 +154,7 @@ $ make demo
|
||||
|
||||
More about `make` read:
|
||||
|
||||
+ [makefile](../docs/conversions/go_code.md)
|
||||
+ [makefile](../docs/contrib/go-code.md)
|
||||
|
||||
Instructions for producing the demo movie:
|
||||
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
#fixme This scripts is the total startup scripts
|
||||
#fixme The full name of the shell scripts that needs to be started is placed in the need_to_start_server_shell array
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||
source "${OPENIM_ROOT}/scripts/lib/init.sh"
|
||||
|
||||
trap 'openim::util::onCtrlC' INT
|
||||
|
||||
need_to_start_server_shell=(
|
||||
"oepnim-api.sh"
|
||||
"openim-rpc.sh"
|
||||
"openim-msggateway.sh"
|
||||
"openim-push.sh"
|
||||
"openim-msgtransfer.sh"
|
||||
)
|
||||
|
||||
time=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
|
||||
for _ in {1..3}; do
|
||||
echo "==========================================================" >> $OPENIM_ROOT/logs/openIM.log 2>&1
|
||||
done
|
||||
|
||||
echo "==========server start time:${time}===========" >> $OPENIM_ROOT/logs/openIM.log 2>&1
|
||||
|
||||
for _ in {1..3}; do
|
||||
echo "==========================================================" >> $OPENIM_ROOT/logs/openIM.log 2>&1
|
||||
done
|
||||
|
||||
build_pid_array=()
|
||||
idx=0
|
||||
for i in ${need_to_start_server_shell[*]}; do
|
||||
chmod +x $i
|
||||
./$i &
|
||||
build_pid=$!
|
||||
echo "build_pid " $build_pid
|
||||
build_pid_array[idx]=$build_pid
|
||||
let idx=idx+1
|
||||
done
|
||||
|
||||
echo "wait all start finish....."
|
||||
|
||||
exit 0
|
||||
|
||||
success_num=0
|
||||
for ((i = 0; i < ${#need_to_start_server_shell[*]}; i++)); do
|
||||
echo "wait pid: " ${build_pid_array[i]} ${need_to_start_server_shell[$i]}
|
||||
wait ${build_pid_array[i]}
|
||||
stat=$?
|
||||
echo ${build_pid_array[i]} " " $stat
|
||||
if [ $stat == 0 ]
|
||||
then
|
||||
# echo -e "${GREEN_PREFIX}${need_to_start_server_shell[$i]} successfully be built ${COLOR_SUFFIX}\n"
|
||||
let success_num=$success_num+1
|
||||
|
||||
else
|
||||
#echo -e "${RED_PREFIX}${need_to_start_server_shell[$i]} build failed ${COLOR_SUFFIX}\n"
|
||||
exit -1
|
||||
fi
|
||||
done
|
||||
|
||||
echo "success_num" $success_num "service num:" ${#need_to_start_server_shell[*]}
|
||||
if [ $success_num == ${#need_to_start_server_shell[*]} ]
|
||||
then
|
||||
echo -e ${BACKGROUND_GREEN}"all services build success"${COLOR_SUFFIX}
|
||||
fi
|
||||
@@ -1,13 +0,0 @@
|
||||
@echo off
|
||||
set output_dir=%~dp0..\_output\bin\platforms\windows
|
||||
|
||||
set "rpc_apps=auth conversation friend group msg third user"
|
||||
set "other_apps=api push msgtransfer msggateway"
|
||||
|
||||
for %%a in (%rpc_apps%) do (
|
||||
go build -o %output_dir%\%%a.exe ../cmd/openim-rpc/openim-rpc-%%a/main.go
|
||||
)
|
||||
|
||||
for %%a in (%other_apps%) do (
|
||||
go build -o %output_dir%\%%a.exe ../cmd/openim-%%a/main.go
|
||||
)
|
||||
@@ -14,7 +14,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
# Usage Instructions: https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/git_cherry-pick.md
|
||||
# Usage Instructions: https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/gitcherry-pick.md
|
||||
|
||||
# Checkout a PR from GitHub. (Yes, this is sitting in a Git tree. How
|
||||
# meta.) Assumes you care about pulls from remote "upstream" and
|
||||
@@ -68,7 +68,7 @@ if [[ "$#" -lt 2 ]]; then
|
||||
echo " Set UPSTREAM_REMOTE (default: upstream) and FORK_REMOTE (default: origin)"
|
||||
echo " to override the default remote names to what you have locally."
|
||||
echo
|
||||
echo " For merge process info, see https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/git_cherry-pick.md"
|
||||
echo " For merge process info, see https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/gitcherry-pick.md"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
@@ -145,7 +145,7 @@ Cherry pick of ${PULLSUBJ} on ${rel}.
|
||||
|
||||
${numandtitle}
|
||||
|
||||
For details on the cherry pick process, see the [cherry pick requests](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/git_cherry-pick.md) page.
|
||||
For details on the cherry pick process, see the [cherry pick requests](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/gitcherry-pick.md) page.
|
||||
|
||||
\`\`\`release-note
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
# 本脚本功能:根据 scripts/environment.sh 配置,生成 OPENIM 组件 YAML 配置文件。
|
||||
# 示例:./scripts/genconfig.sh scripts/install/environment.sh scripts/template/config.yaml
|
||||
# Read: https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/init_config.md
|
||||
# Read: https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/init-config.md
|
||||
|
||||
env_file="$1"
|
||||
template_file="$2"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
# This script automatically initializes the various configuration files
|
||||
# Read: https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/init_config.md
|
||||
# Read: https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/init-config.md
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
# This is a file that initializes variables for the automation script that initializes the config file
|
||||
# You need to supplement the script according to the specification.
|
||||
# Read: https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/init_config.md
|
||||
# Read: https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/init-config.md
|
||||
# 格式化 bash 注释:https://tool.lu/shell/
|
||||
# 配置中心文档:https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md
|
||||
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||
source "${OPENIM_ROOT}/scripts/lib/init.sh"
|
||||
source "${OPENIM_ROOT}/scripts/install/environment.sh"
|
||||
|
||||
openim::util::onCtrlC
|
||||
|
||||
docker_compose_file_name="docker-compose.yaml"
|
||||
|
||||
# Load environment variables from .env file
|
||||
load_env() {
|
||||
source "${OPENIM_ROOT}"/.env
|
||||
}
|
||||
|
||||
# Replace local IP with public IP in .env
|
||||
replace_ip() {
|
||||
if [ "$API_URL" == "http://127.0.0.1:10002/object/" ]; then
|
||||
sed -i "s/127.0.0.1/${internet_ip}/" "${OPENIM_ROOT}"/.env
|
||||
fi
|
||||
|
||||
if [ "$MINIO_ENDPOINT" == "http://127.0.0.1:10005" ]; then
|
||||
sed -i "s/127.0.0.1/${internet_ip}/" "${OPENIM_ROOT}"/.env
|
||||
fi
|
||||
|
||||
openim::log::info "Your minio endpoint is ${MINIO_ENDPOINT}"
|
||||
}
|
||||
|
||||
# Execute necessary scripts
|
||||
execute_scripts() {
|
||||
chmod +x "${OPENIM_ROOT}"/scripts/*.sh
|
||||
openim::log::info "Executing init_pwd.sh"
|
||||
"${OPENIM_ROOT}"/scripts/init_pwd.sh
|
||||
|
||||
openim::log::info "Executing env_check.sh"
|
||||
"${OPENIM_ROOT}"/scripts/env_check.sh
|
||||
}
|
||||
|
||||
openim::util::check_docker_and_compose_versions
|
||||
|
||||
main() {
|
||||
load_env
|
||||
openim::util::get_server_ip
|
||||
replace_ip
|
||||
execute_scripts
|
||||
start_docker_compose
|
||||
openim::log::success "Script executed successfully"
|
||||
}
|
||||
|
||||
# Run the main function
|
||||
main
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
DOCKER := docker
|
||||
|
||||
# read: https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/images.md
|
||||
# read: https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/images.md
|
||||
REGISTRY_PREFIX ?= registry.cn-hangzhou.aliyuncs.com/openimsdk
|
||||
# REGISTRY_PREFIX ?= ghcr.io/openimsdk
|
||||
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
cd %~p0../_output/bin/platforms/windows
|
||||
start api.exe -p 10002
|
||||
start auth.exe -p 10060
|
||||
start conversation.exe -p 10080
|
||||
start friend.exe -p 10020
|
||||
start group.exe -p 10050
|
||||
start msg.exe -p 10030
|
||||
start msggateway.exe -p 10040 -w 10001
|
||||
start msgtransfer.exe
|
||||
start third.exe -p 10090
|
||||
start push.exe -p 10070
|
||||
start user.exe -p 10010
|
||||
@@ -6,9 +6,9 @@ Learn more about versions of OpenIM:
|
||||
|
||||
+ We release logs are recorded on [✨CHANGELOG](https://github.com/{{ .Env.USERNAME }}/{{ .ProjectName }}/blob/main/CHANGELOG/CHANGELOG.md)
|
||||
|
||||
+ For information on versions of OpenIM and how to maintain branches, read [📚this article](https://github.com/{{ .Env.USERNAME }}/{{ .ProjectName }}/blob/main/docs/conversions/version.md)
|
||||
+ For information on versions of OpenIM and how to maintain branches, read [📚this article](https://github.com/{{ .Env.USERNAME }}/{{ .ProjectName }}/blob/main/docs/contrib/version.md)
|
||||
|
||||
+ If you wish to use mirroring, read OpenIM's [🤲image management policy](https://github.com/{{ .Env.USERNAME }}/{{ .ProjectName }}/blob/main/docs/conversions/images.md)
|
||||
+ If you wish to use mirroring, read OpenIM's [🤲image management policy](https://github.com/{{ .Env.USERNAME }}/{{ .ProjectName }}/blob/main/docs/contrib/images.md)
|
||||
|
||||
**Want to be one of them 😘?**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user