feat: fix scripts

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
pull/462/head
Xinwei Xiong(cubxxw-openim) 1 year ago
parent 049ae6eb80
commit 396f455c77

@ -25,7 +25,7 @@ echo -e "\n"
echo -e "${BOLD_PREFIX}_____ _ _ _____ _____ _____ _____ _____ _____ _____ _____ _____ ${COLOR_SUFFIX}"
bin_dir="../bin"
bin_dir="$BIN_DIR"
logs_dir="../logs"
sdk_db_dir="../db/sdk/"
# Automatically created when there is no bin, logs folder

@ -2,7 +2,7 @@
demo_server_name="openim_chat_api"
demo_server_binary_root="../bin/"
demo_server_binary_root="$BIN_DIR/"

@ -40,6 +40,21 @@ if [[ `git status --porcelain` ]]; then
exit 1
fi
PURPLE_PREFIX="\033[35m" # Purple prefix
BOLD_PREFIX="\033[1m" # Bold prefix
# Get current time
time=$(date +"%Y-%m-%d %H:%M:%S")
# Print section separator
echo -e "${PURPLE_PREFIX}==========================================================${COLOR_SUFFIX}"
# Print time of submission
echo -e "${BOLD_PREFIX}${CYAN_PREFIX}Time of submission: ${time}${COLOR_SUFFIX}"
# Print section separator
echo -e "${PURPLE_PREFIX}==========================================================${COLOR_SUFFIX}"
#
#printMessage "Running the Flutter analyzer"
#flutter analyze

@ -14,9 +14,17 @@
# limitations under the License.
#Include shell font styles and some basic information
source ./style_info.cfg
source ./path_info.cfg
source ./function.sh
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
#Include shell font styles and some basic information
source $OPENIM_ROOT/scripts/style_info.cfg
source $OPENIM_ROOT/scripts/path_info.cfg
source $OPENIM_ROOT/scripts/function
bin_dir="$OPENIM_ROOT/bin"
logs_dir="$OPENIM_ROOT/logs"
sdk_db_dir="$OPENIM_ROOT/sdk/db/"
ulimit -n 200000
list1=$(cat $config_path | grep openImMessageGatewayPort | awk -F '[:]' '{print $NF}')

@ -23,7 +23,7 @@ if [[ -z ${supported_architectures["$version-$architecture"]} ]]; then
echo "================> Unsupported architecture: $architecture or version: $version"
exit 1
fi
Server Start Time
echo "================> Architecture: $architecture"
# Set the BIN_DIR based on the architecture and version

@ -14,9 +14,18 @@
# limitations under the License.
#Include shell font styles and some basic information
source ./style_info.cfg
source ./path_info.cfg
source ./function.sh
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
#Include shell font styles and some basic information
source $OPENIM_ROOT/scripts/style_info.cfg
source $OPENIM_ROOT/scripts/path_info.cfg
source $OPENIM_ROOT/scripts/function
bin_dir="$OPENIM_ROOT/bin"
logs_dir="$OPENIM_ROOT/logs"
sdk_db_dir="$OPENIM_ROOT/sdk/db/"
cd "$OPENIM_ROOT/scripts/"
list1=$(cat $config_path | grep openImPushPort | awk -F '[:]' '{print $NF}')
list2=$(cat $config_path | grep pushPrometheusPort | awk -F '[:]' '{print $NF}')

@ -17,11 +17,19 @@
#FIXME The full names of the shell scripts that need to be started are placed in the `need_to_start_server_shell` array.
#Include shell font styles and some basic information
source ./style_info.cfg
source ./path_info.cfg
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
#Include shell font styles and some basic information
source $OPENIM_ROOT/scripts/style_info.cfg
source $OPENIM_ROOT/scripts/path_info.cfg
source $OPENIM_ROOT/scripts/function
bin_dir="$OPENIM_ROOT/bin"
logs_dir="$OPENIM_ROOT/logs"
sdk_db_dir="$OPENIM_ROOT/sdk/db/"
cd "$OPENIM_ROOT/scripts/"
# Print title
echo -e "${BOLD_PREFIX}${BLUE_PREFIX}OpenIM Server Start${COLOR_SUFFIX}"

@ -13,11 +13,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#Include shell font styles and some basic information
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
#Include shell font styles and some basic information
source $OPENIM_ROOT/scripts/style_info.cfg
source $OPENIM_ROOT/scripts/path_info.cfg
source $OPENIM_ROOT/scripts/function
bin_dir="$OPENIM_ROOT/bin"
logs_dir="$OPENIM_ROOT/logs"
sdk_db_dir="$OPENIM_ROOT/sdk/db/"
cd "$OPENIM_ROOT/scripts/"
#Check if the service exists
#If it is exists,kill this process

@ -20,7 +20,7 @@ source $OPENIM_ROOT/scripts/style_info.cfg
source $OPENIM_ROOT/scripts/path_info.cfg
source $OPENIM_ROOT/scripts/function
bin_dir="$OPENIM_ROOT/bin"
bin_dir="$BIN_DIR"
logs_dir="$OPENIM_ROOT/logs"
sdk_db_dir="$OPENIM_ROOT/sdk/db/"
@ -80,7 +80,7 @@ for ((i = 0; i < ${#service_filename[*]}; i++)); do
kill -9 $(eval $pid)
sleep 0.5
fi
cd ../bin
cd $
#Get the rpc port in the configuration file
portList=$(cat $config_path | grep ${service_port_name[$i]} | awk -F '[:]' '{print $NF}')
list_to_string ${portList}

@ -13,11 +13,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#fixme This scripts is to stop the service
#Include shell font styles and some basic information
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
source ./style_info.cfg
source ./path_info.cfg
#Include shell font styles and some basic information
source $OPENIM_ROOT/scripts/style_info.cfg
source $OPENIM_ROOT/scripts/path_info.cfg
source $OPENIM_ROOT/scripts/function
bin_dir="$OPENIM_ROOT/bin"
logs_dir="$OPENIM_ROOT/logs"
sdk_db_dir="$OPENIM_ROOT/sdk/db/"
cd "$OPENIM_ROOT/scripts/"
for i in ${service_names[*]}; do
#Check whether the service exists

Loading…
Cancel
Save