feat: add rpc build and start

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
This commit is contained in:
Xinwei Xiong(cubxxw-openim)
2023-08-17 11:25:09 +08:00
parent 405776d321
commit fd894c3d83
6 changed files with 111 additions and 100 deletions
+2 -4
View File
@@ -13,12 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# The golang package that we are building.
OPENIM_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd -P)"
readonly KUBE_GO_PACKAGE=github.com/openimsdk/open-im-server
readonly KUBE_GOPATH="${KUBE_GOPATH:-"${KUBE_OUTPUT}/go"}"
export KUBE_GOPATH
readonly OPENIM_GO_PACKAGE=github.com/openimsdk/open-im-server
# The server platform we are building on.
readonly OPENIM_SUPPORTED_SERVER_PLATFORMS=(
@@ -95,6 +92,7 @@ readonly OPENIM_SERVER_BINARIES=("${OPENIM_SERVER_TARGETS[@]##*/}")
START_SCRIPTS_PATH="${OPENIM_ROOT}/scripts/install/"
openim::golang::start_script_list() {
local targets=(
openim-api.sh
openim-rpc.sh
openim-push.sh
openim-msgtransfer.sh
+3 -2
View File
@@ -308,7 +308,7 @@ openim::util::check_ports() {
return 0
fi
}
# openim::util::check_ports 9090 9092
# openim::util::check_ports 10002 1004
# The `openim::util::check_process_names` function analyzes the state of processes based on given names.
# It accepts multiple process names as arguments and prints:
@@ -1191,11 +1191,12 @@ function openim::util::run::relative() {
# It primarily uses the `curl` command to fetch the public IP address from ifconfig.me.
# If curl or the service is not available, it falls back
# to the internal IP address provided by the hostname command.
# TODO: If a delay is found, the delay needs to be addressed
function openim::util::get_server_ip() {
# Check if the 'curl' command is available
if command -v curl &> /dev/null; then
# Try to retrieve the public IP address using curl and ifconfig.me
IP=$(curl -s ifconfig.me)
IP=$(dig TXT +short o-o.myaddr.l.google.com @ns1.google.com)
# Check if IP retrieval was successful
if [[ -z "$IP" ]]; then